2016-12-06 18:04:10 +00:00
|
|
|
if (APPLE)
|
2017-04-01 07:20:54 +00:00
|
|
|
# lib from libs/libcommon
|
2017-12-13 19:07:12 +00:00
|
|
|
set (RT_LIBRARY "apple_rt")
|
2016-12-06 18:04:10 +00:00
|
|
|
else ()
|
2017-12-13 19:07:12 +00:00
|
|
|
find_library (RT_LIBRARY rt)
|
2016-12-06 18:04:10 +00:00
|
|
|
endif ()
|
|
|
|
|
2017-12-13 19:07:12 +00:00
|
|
|
message(STATUS "Using rt: ${RT_LIBRARY}")
|
2017-01-27 20:00:02 +00:00
|
|
|
|
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 ()
|