summaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0b44852e38eaa..0202ca8625c9d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -14,6 +14,11 @@ set(CXXRT_SOURCES
add_library(cxxrt-static STATIC ${CXXRT_SOURCES})
add_library(cxxrt-shared SHARED ${CXXRT_SOURCES})
+if ("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
+ target_link_libraries(cxxrt-shared dl)
+ target_link_libraries(cxxrt-static dl)
+endif()
+
set_target_properties(cxxrt-static cxxrt-shared PROPERTIES
OUTPUT_NAME "cxxrt"
)