Am 07.01.2014 12:56, schrieb Cedric Doucet:
He llo,

I would like to know how to add "-lrt" at the end of link.txt.
I tried to do that by modifying CMakeLists.txt.
I added the following lines:
----------------------------------------------------------------------------------------------------------------
list(APPEND CMAKE_CXX_FLAGS "-lrt")
list(REMOVE_DUPLICATES CMAKE_CXX_FLAGS)
string(REPLACE ";" " " CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
----------------------------------------------------------------------------------------------------------------
However, it does not work.

Anybody have an idea?

target_link_libraries(my_target_that_needs_rt rt)

HTH,

Eike
--

Powered by www.kitware.com

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Kitware offers various services to support the CMake community. For more 
information on each offering, please visit:

CMake Support: http://cmake.org/cmake/help/support.html
CMake Consulting: http://cmake.org/cmake/help/consulting.html
CMake Training Courses: http://cmake.org/cmake/help/training.html

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to