summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2024-12-27 12:33:55 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2024-12-27 20:39:23 +0900
commit45ff2423e03a3ed3c8855c7b599a664891623ba1 (patch)
tree125a2be62df1dfbda9e284b0d371a1fd363103bf
parent493173b2a861800c6f2b9eb9e50c1d0dd2db8557 (diff)
downloadarts-45ff2423e03a3ed3c8855c7b599a664891623ba1.tar.gz
arts-45ff2423e03a3ed3c8855c7b599a664891623ba1.zip
Replace pthread and dl linking with cmake-based variables
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
-rw-r--r--ConfigureChecks.cmake13
-rw-r--r--artsc/CMakeLists.txt6
-rw-r--r--mcop_mt/CMakeLists.txt2
3 files changed, 6 insertions, 15 deletions
diff --git a/ConfigureChecks.cmake b/ConfigureChecks.cmake
index 08fe29b..9efdde7 100644
--- a/ConfigureChecks.cmake
+++ b/ConfigureChecks.cmake
@@ -50,22 +50,13 @@ check_include_file( "pthread.h" HAVE_LIBPTHREAD )
##### check for system libraries ################
-set( DL_LIBRARIES dl )
-check_library_exists( ${DL_LIBRARIES} dlopen /lib HAVE_LIBDL )
-if( NOT HAVE_LIBDL )
- unset( DL_LIBRARIES )
- check_function_exists( dlopen HAVE_DLOPEN )
- if( HAVE_DLOPEN )
- set( HAVE_LIBDL 1 )
- endif( HAVE_DLOPEN )
-endif( NOT HAVE_LIBDL )
-
find_package( Threads )
##### check for functions #######################
-tde_save_and_set( CMAKE_REQUIRED_LIBRARIES ${DL_LIBRARIES} )
+tde_save_and_set( CMAKE_REQUIRED_LIBRARIES ${CMAKE_DL_LIBS} )
+check_function_exists( dlopen HAVE_LIBDL )
check_function_exists( dlerror HAVE_DLERROR )
check_function_exists( strcmp HAVE_STRCMP )
check_function_exists( strchr HAVE_STRCHR )
diff --git a/artsc/CMakeLists.txt b/artsc/CMakeLists.txt
index 0966a45..0aec7e7 100644
--- a/artsc/CMakeLists.txt
+++ b/artsc/CMakeLists.txt
@@ -18,8 +18,8 @@ set( prefix ${CMAKE_INSTALL_PREFIX} )
set( exec_prefix $prefix )
set( libdir ${LIB_INSTALL_DIR} )
set( includedir ${CMAKE_INSTALL_PREFIX}/include/artsc )
-if( NOT "${DL_LIBRARIES}" STREQUAL "" )
- set( LIBDL -l${DL_LIBRARIES} )
+if( NOT "${CMAKE_DL_LIBS}" STREQUAL "" )
+ set( LIBDL -l${CMAKE_DL_LIBS} )
endif( )
set( USE_THREADS )
set( LIBPTHREAD ${CMAKE_THREAD_LIBS_INIT} )
@@ -72,7 +72,7 @@ install( FILES
tde_add_library( artsdsp SHARED
SOURCES artsdsp.c
VERSION 0.0.0
- LINK artsc-shared ${DL_LIBRARIES}
+ LINK artsc-shared ${CMAKE_DL_LIBS}
DESTINATION ${LIB_INSTALL_DIR}
)
diff --git a/mcop_mt/CMakeLists.txt b/mcop_mt/CMakeLists.txt
index 832b6d8..8816447 100644
--- a/mcop_mt/CMakeLists.txt
+++ b/mcop_mt/CMakeLists.txt
@@ -24,6 +24,6 @@ include_directories(
tde_add_library( mcop_mt SHARED
SOURCES threads_posix.cpp
VERSION 1.0.0
- LINK artsflow-shared pthread
+ LINK artsflow-shared ${CMAKE_THREAD_LIBS_INIT}
DESTINATION ${LIB_INSTALL_DIR}
)