mirror of
https://github.com/KhronosGroup/SPIRV-Tools
synced 2024-12-27 10:20:14 +00:00
Fixed undefined reference to 'clock_gettime' by linking rt library (#2409)
This commit is contained in:
parent
a006cbc1d0
commit
37b584a736
@ -361,6 +361,14 @@ target_compile_definitions(${SPIRV_TOOLS}-shared
|
||||
)
|
||||
add_dependencies( ${SPIRV_TOOLS}-shared core_tables enum_string_mapping extinst_tables )
|
||||
|
||||
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
|
||||
find_library(LIBRT rt)
|
||||
if(LIBRT)
|
||||
target_link_libraries(${SPIRV_TOOLS} ${LIBRT})
|
||||
target_link_libraries(${SPIRV_TOOLS}-shared ${LIBRT})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ENABLE_SPIRV_TOOLS_INSTALL)
|
||||
install(TARGETS ${SPIRV_TOOLS} ${SPIRV_TOOLS}-shared
|
||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||
|
Loading…
Reference in New Issue
Block a user