diff options
author | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-12-27 11:51:10 +0900 |
---|---|---|
committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2024-12-27 18:44:22 +0900 |
commit | c2a083fde3eba226121b95fa530aa21c635ceef0 (patch) | |
tree | 0e7ffbd8afbf516165ec51f10811e232e4cfbb41 /CMakeLists.txt | |
parent | 9e8c893bcabdf1e7427ddc7ad7bcda2d98e58f1a (diff) | |
download | libr-c2a083fde3eba226121b95fa530aa21c635ceef0.tar.gz libr-c2a083fde3eba226121b95fa530aa21c635ceef0.zip |
Replace pthread and dl linking with cmake-based variablesr14.1.x
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit a6a56789c93c3d235bbd188bb744d20301538f8e)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 329e7b8..ba522b1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -27,6 +27,7 @@ set( PACKAGE_VERSION 0.7.0 ) ##### include essential cmake modules ########### include( FindPkgConfig ) +include( FindThreads ) include( CheckIncludeFile ) include( CheckFunctionExists ) include( CheckLibraryExists ) @@ -106,17 +107,6 @@ if( WITH_GTK ) endif( ) endif( WITH_GTK ) -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 ) - -set( EXTRA_LIBRARIES "-lm -lpthread" ) if( UNIX ) set( CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fvisibility=hidden" ) endif( UNIX ) |