diff options
author | Silvio Traversaro <silvio@traversaro.it> | 2023-12-23 11:28:18 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-23 11:28:18 +0100 |
commit | 68dbd5e5f589f6f648e917851e901c538c8d314c (patch) | |
tree | a807fe43d019252836dedcc2026cf46f70458724 /tests | |
parent | 048bff80f2bd00bb651bcc3357cb6f76e3d76fd5 (diff) | |
download | dlfcn-win32-fix49.tar.gz dlfcn-win32-fix49.tar.bz2 dlfcn-win32-fix49.zip |
Add support to consume library via CMake's FetchContentfix49
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CMakeLists.txt | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index cd321f2..e9b3e85 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt | |||
@@ -7,19 +7,19 @@ if(WIN32) | |||
7 | 7 | ||
8 | add_library(testdll2 SHARED testdll2.c) | 8 | add_library(testdll2 SHARED testdll2.c) |
9 | set_target_properties(testdll2 PROPERTIES PREFIX "") | 9 | set_target_properties(testdll2 PROPERTIES PREFIX "") |
10 | target_link_libraries(testdll2 dl) | 10 | target_link_libraries(testdll2 dlfcn-win32::dl) |
11 | 11 | ||
12 | add_library(testdll3 SHARED testdll3.c) | 12 | add_library(testdll3 SHARED testdll3.c) |
13 | set_target_properties(testdll3 PROPERTIES PREFIX "") | 13 | set_target_properties(testdll3 PROPERTIES PREFIX "") |
14 | 14 | ||
15 | add_executable(t_dlfcn test.c) | 15 | add_executable(t_dlfcn test.c) |
16 | target_link_libraries(t_dlfcn dl) | 16 | target_link_libraries(t_dlfcn dlfcn-win32::dl) |
17 | 17 | ||
18 | add_test(NAME t_dlfcn COMMAND t_dlfcn WORKING_DIRECTORY $<TARGET_FILE_DIR:t_dlfcn> ) | 18 | add_test(NAME t_dlfcn COMMAND t_dlfcn WORKING_DIRECTORY $<TARGET_FILE_DIR:t_dlfcn> ) |
19 | endif() | 19 | endif() |
20 | 20 | ||
21 | add_executable(test-dladdr test-dladdr.c) | 21 | add_executable(test-dladdr test-dladdr.c) |
22 | target_link_libraries(test-dladdr dl) | 22 | target_link_libraries(test-dladdr dlfcn-win32::dl) |
23 | if(UNIX) | 23 | if(UNIX) |
24 | set_target_properties(test-dladdr PROPERTIES COMPILE_FLAGS "-Wl,--export-dynamic -fpie") | 24 | set_target_properties(test-dladdr PROPERTIES COMPILE_FLAGS "-Wl,--export-dynamic -fpie") |
25 | endif() | 25 | endif() |