2016-12-06 18:04:10 +00:00
|
|
|
if (APPLE)
|
2017-04-01 07:20:54 +00:00
|
|
|
# lib from libs/libcommon
|
|
|
|
set (RT_LIBRARIES "apple_rt")
|
2016-12-06 18:04:10 +00:00
|
|
|
else ()
|
2017-04-01 07:20:54 +00:00
|
|
|
find_library (RT_LIBRARIES rt)
|
2016-12-06 18:04:10 +00:00
|
|
|
endif ()
|
|
|
|
|
2017-01-27 20:00:02 +00:00
|
|
|
message(STATUS "Using rt: ${RT_LIBRARIES}")
|
|
|
|
|
2016-12-06 21:01:19 +00:00
|
|
|
function (target_link_rt_by_force TARGET)
|
2017-04-01 07:20:54 +00:00
|
|
|
if (NOT APPLE)
|
|
|
|
set (FLAGS "-Wl,-no-as-needed -lrt -Wl,-as-needed")
|
|
|
|
set_property (TARGET ${TARGET} APPEND PROPERTY LINK_FLAGS "${FLAGS}")
|
|
|
|
endif ()
|
2016-12-06 21:01:19 +00:00
|
|
|
endfunction ()
|