diff options
author | David Sommerseth <dazo@users.sourceforge.net> | 2010-12-31 18:11:30 +0100 |
---|---|---|
committer | David Sommerseth <dazo@users.sourceforge.net> | 2010-12-31 18:11:30 +0100 |
commit | 930bb01fffd23a04d744fab62e94ce8a4bd9e04c (patch) | |
tree | 14e8ac81d91b6b0b20321acfad031a6c6887e2eb | |
parent | 0be70a290dfe9228cbbe2702132f77f41bdbf962 (diff) | |
download | eurephia-930bb01fffd23a04d744fab62e94ce8a4bd9e04c.tar.gz eurephia-930bb01fffd23a04d744fab62e94ce8a4bd9e04c.tar.xz eurephia-930bb01fffd23a04d744fab62e94ce8a4bd9e04c.zip |
Only look for dlopen() and dlclose() in libdl on Linux
Other platforms, like FreeBDS, have these functions in the standard
libc library.
Signed-off-by: David Sommerseth <dazo@users.sourceforge.net>
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index ab21b37..08110c3 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -50,6 +50,8 @@ INCLUDE(CheckIncludeFile) INCLUDE(CheckLibraryExists) FIND_PACKAGE(PkgConfig) +MESSAGE(STATUS "Build Platform: ${CMAKE_SYSTEM_NAME}") + # # Add support for extra eurephia modules # @@ -105,8 +107,13 @@ ENDIF(PLUGIN) # Check that we have dynamic loader available CHECK_INCLUDE_FILE(dlfcn.h HAVE_DLFCN_H) -CHECK_LIBRARY_EXISTS(dl dlopen "" HAVE_DLOPEN) -CHECK_LIBRARY_EXISTS(dl dlclose "" HAVE_DLCLOSE) +IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") + CHECK_LIBRARY_EXISTS(dl dlopen "" HAVE_DLOPEN) + CHECK_LIBRARY_EXISTS(dl dlclose "" HAVE_DLCLOSE) +ELSE(!${CMAKE_SYSTEM_NAME} MATCHES "Linux") + CHECK_LIBRARY_EXISTS(c dlopen "" HAVE_DLOPEN) + CHECK_LIBRARY_EXISTS(c dlclose "" HAVE_DLCLOSE) +ENDIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") IF(NOT HAVE_DLOPEN OR NOT HAVE_DLCLOSE) message(FATAL_ERROR "Missing proper dl library") ENDIF(NOT HAVE_DLOPEN OR NOT HAVE_DLCLOSE) |