aboutsummaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
diff options
context:
space:
mode:
authorRalf Habacker <ralf.habacker@freenet.de>2020-12-11 14:32:52 +0100
committerRalf Habacker <ralf.habacker@freenet.de>2021-01-17 12:51:39 +0100
commit0ea2334d46ca84c1a27bd086700f620a06401f94 (patch)
tree89e768d6c77492dee9cf6b520d562b8e35a7cee5 /src/CMakeLists.txt
parent06ffb62a31f8986d1cda864bb8c3a8967d5a65fa (diff)
downloaddlfcn-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.txt11
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 @@
1set(headers dlfcn.h) 1set(headers dlfcn.h)
2set(sources dlfcn.c) 2set(sources dlfcn.c)
3 3
4if (BUILD_SHARED_LIBS)
5 add_definitions(-DSHARED)
6endif (BUILD_SHARED_LIBS)
7 4
8add_library(dl ${sources}) 5add_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
11target_include_directories(dl INTERFACE $<INSTALL_INTERFACE:include>) 8target_include_directories(dl INTERFACE $<INSTALL_INTERFACE:include>)
12 9
10# dot not add -D<target>_EXPORTS
11set_target_properties(dl PROPERTIES DEFINE_SYMBOL "")
12
13# set shared mode for compiling library and propagate mode to cmake clients
14if (BUILD_SHARED_LIBS)
15 target_compile_definitions(dl PUBLIC DLFCN_WIN32_SHARED)
16endif (BUILD_SHARED_LIBS)
17
13install (TARGETS dl EXPORT dlfcn-win32-targets 18install (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}