Blob Blame Raw
From 3b7b2ba770daba0ca360aeeff08d422470720cb6 Mon Sep 17 00:00:00 2001
From: Yuri <yuri@tsoft.com>
Date: Sun, 14 Jan 2018 11:00:38 -0800
Subject: [PATCH 07/16] Replaced dl with ${CMAKE_DL_LIBS} in CMakeLists.txt
 files for compatibility with systems which don't need -ldl.

---
 k3dsdk/CMakeLists.txt    | 2 +-
 tests/sdk/CMakeLists.txt | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/k3dsdk/CMakeLists.txt b/k3dsdk/CMakeLists.txt
index a5af9fe2..f9c452b8 100644
--- a/k3dsdk/CMakeLists.txt
+++ b/k3dsdk/CMakeLists.txt
@@ -57,7 +57,7 @@ TARGET_LINK_LIBRARIES(k3dsdk
 	${Boost_PROGRAM_OPTIONS_LIBRARY}
 	${Boost_UNIT_TEST_FRAMEWORK_LIBRARY}
 	${Boost_SYSTEM_LIBRARY}
-  "dl" # for gold linker
+	${CMAKE_DL_LIBS} # for gold linker
 	)
 
 IF(K3D_ENABLE_NLS)
diff --git a/tests/sdk/CMakeLists.txt b/tests/sdk/CMakeLists.txt
index 2a670057..56483430 100644
--- a/tests/sdk/CMakeLists.txt
+++ b/tests/sdk/CMakeLists.txt
@@ -76,7 +76,7 @@ IF(UNIX)
 	GET_TARGET_PROPERTY(SHARED_DYNAMIC_CAST_LIBRARY shared-dynamic-cast LOCATION)
 	CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/shared_dynamic_cast_config.h.in ${CMAKE_CURRENT_BINARY_DIR}/shared_dynamic_cast_config.h)
 	ADD_EXECUTABLE(test-shared-dynamic-cast shared_dynamic_cast.cpp)
-  target_link_libraries(test-shared-dynamic-cast dl)
+	target_link_libraries(test-shared-dynamic-cast ${CMAKE_DL_LIBS})
 	IF(NOT APPLE)
 		SET_TARGET_PROPERTIES(test-shared-dynamic-cast PROPERTIES LINK_FLAGS -Wl,-E)
 	ENDIF()
-- 
2.20.1