diff options
author | Ralf Habacker <ralf.habacker@freenet.de> | 2020-12-11 14:32:52 +0100 |
---|---|---|
committer | Ralf Habacker <ralf.habacker@freenet.de> | 2021-01-17 12:51:39 +0100 |
commit | 0ea2334d46ca84c1a27bd086700f620a06401f94 (patch) | |
tree | 89e768d6c77492dee9cf6b520d562b8e35a7cee5 /src/CMakeLists.txt | |
parent | 06ffb62a31f8986d1cda864bb8c3a8967d5a65fa (diff) | |
download | dlfcn-win32-0ea2334d46ca84c1a27bd086700f620a06401f94.tar.gz dlfcn-win32-0ea2334d46ca84c1a27bd086700f620a06401f94.tar.bz2 dlfcn-win32-0ea2334d46ca84c1a27bd086700f620a06401f94.zip |
Add function dladdr() and associated test application test-dladdr
Diffstat (limited to 'src/CMakeLists.txt')
-rw-r--r-- | src/CMakeLists.txt | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d5296b1..27f9030 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt | |||
@@ -1,15 +1,20 @@ | |||
1 | set(headers dlfcn.h) | 1 | set(headers dlfcn.h) |
2 | set(sources dlfcn.c) | 2 | set(sources dlfcn.c) |
3 | 3 | ||
4 | if (BUILD_SHARED_LIBS) | ||
5 | add_definitions(-DSHARED) | ||
6 | endif (BUILD_SHARED_LIBS) | ||
7 | 4 | ||
8 | add_library(dl ${sources}) | 5 | add_library(dl ${sources}) |
9 | 6 | ||
10 | # Correctly export the location of installed includes in the target | 7 | # Correctly export the location of installed includes in the target |
11 | target_include_directories(dl INTERFACE $<INSTALL_INTERFACE:include>) | 8 | target_include_directories(dl INTERFACE $<INSTALL_INTERFACE:include>) |
12 | 9 | ||
10 | # dot not add -D<target>_EXPORTS | ||
11 | set_target_properties(dl PROPERTIES DEFINE_SYMBOL "") | ||
12 | |||
13 | # set shared mode for compiling library and propagate mode to cmake clients | ||
14 | if (BUILD_SHARED_LIBS) | ||
15 | target_compile_definitions(dl PUBLIC DLFCN_WIN32_SHARED) | ||
16 | endif (BUILD_SHARED_LIBS) | ||
17 | |||
13 | install (TARGETS dl EXPORT dlfcn-win32-targets | 18 | install (TARGETS dl EXPORT dlfcn-win32-targets |
14 | RUNTIME DESTINATION bin | 19 | RUNTIME DESTINATION bin |
15 | LIBRARY DESTINATION lib${LIB_SUFFIX} | 20 | LIBRARY DESTINATION lib${LIB_SUFFIX} |