Enable linking against libSPIRV-Tools from linux shared libraries

Required for linking against libSPIRV-Tools from LVL's
libVkLayer_core_validation.so.

Signed-off-by: Chris Forbes <chrisforbes@google.com>
This commit is contained in:
Chris Forbes 2016-04-04 10:21:35 +12:00
parent c9b2285bfc
commit d03c0a1153

View File

@ -29,6 +29,8 @@ project(spirv-tools)
enable_testing()
set(SPIRV_TOOLS "SPIRV-Tools")
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
add_definitions(-DSPIRV_LINUX)
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")