From 01d16568c29adba5b4b32706212195adfed71454 Mon Sep 17 00:00:00 2001 From: Zakariyya Mughal Date: Wed, 14 Oct 2020 03:14:03 -0500 Subject: [PATCH] Use ${CMAKE_DL_LIBS} instead of explicit "-ldl" --- core/CMakeLists.txt | 2 +- examples/cpp_api_example/CMakeLists.txt | 2 +- examples/cpp_poetry_indexer/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index e9db599..a676bb5 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -81,4 +81,4 @@ target_include_directories(${TEST_CORE_TARGET_NAME} PUBLIC "${GENERATED_INCLUDE_DIRECTORY}" ) -target_link_libraries(${TEST_CORE_TARGET_NAME} ${LIB_CORE_TARGET_NAME} "-ldl") +target_link_libraries(${TEST_CORE_TARGET_NAME} ${LIB_CORE_TARGET_NAME} ${CMAKE_DL_LIBS}) diff --git a/examples/cpp_api_example/CMakeLists.txt b/examples/cpp_api_example/CMakeLists.txt index ab021c4..b5335d0 100644 --- a/examples/cpp_api_example/CMakeLists.txt +++ b/examples/cpp_api_example/CMakeLists.txt @@ -17,7 +17,7 @@ target_include_directories(${EXAMPLE_NAME} PUBLIC "${CORE_SOURCE_DIR}/include" ) -target_link_libraries(${EXAMPLE_NAME} ${LIB_CORE_TARGET_NAME} "-ldl") +target_link_libraries(${EXAMPLE_NAME} ${LIB_CORE_TARGET_NAME} ${CMAKE_DL_LIBS}) # --- Configure Sourcetrail Project File --- diff --git a/examples/cpp_poetry_indexer/CMakeLists.txt b/examples/cpp_poetry_indexer/CMakeLists.txt index 7af9d8e..b49dfb7 100644 --- a/examples/cpp_poetry_indexer/CMakeLists.txt +++ b/examples/cpp_poetry_indexer/CMakeLists.txt @@ -17,7 +17,7 @@ target_include_directories(${EXAMPLE_NAME} PUBLIC "${CORE_SOURCE_DIR}/include" ) -target_link_libraries(${EXAMPLE_NAME} ${LIB_CORE_TARGET_NAME} "-ldl") +target_link_libraries(${EXAMPLE_NAME} ${LIB_CORE_TARGET_NAME} ${CMAKE_DL_LIBS}) # --- Configure Sourcetrail Project File ---