aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Traversaro <pegua1@gmail.com>2017-08-24 21:50:51 +0100
committerGitHub <noreply@github.com>2017-08-24 21:50:51 +0100
commitb30b758efb90aaf2bc96b034c117c8f21490c54e (patch)
treef3d8442ec4b64e6bd7dd58e41837bc7e86e05681
parentde4a39d3c77f24c080adaba5546c75a7f4899fc1 (diff)
downloaddlfcn-win32-b30b758efb90aaf2bc96b034c117c8f21490c54e.tar.gz
dlfcn-win32-b30b758efb90aaf2bc96b034c117c8f21490c54e.tar.bz2
dlfcn-win32-b30b758efb90aaf2bc96b034c117c8f21490c54e.zip
Mention the possibility of defining CMAKE_DL_LIBS
-rw-r--r--README.md13
1 files changed, 13 insertions, 0 deletions
diff --git a/README.md b/README.md
index 228bd98..6e8ec21 100644
--- a/README.md
+++ b/README.md
@@ -29,6 +29,19 @@ find_package(dlfcn-win32 REQUIRED)
29target_link_libraries(<target> dlfcn-win32::dl) 29target_link_libraries(<target> dlfcn-win32::dl)
30... 30...
31~~~ 31~~~
32If you want to use this library in a cross-platform project, a convenient way
33to proceed is to define the CMake variable [`CMAKE_DL_LIBS`](https://cmake.org/cmake/help/latest/variable/CMAKE_DL_LIBS.html)
34(that is normally empty on Windows) and then use it for linking:
35~~~
36...
37if (WIN32)
38 find_package(dlfcn-win32 REQUIRED)
39 set(CMAKE_DL_LIBS dlfcn-win32::dl)
40endif ()
41...
42target_link_libraries(<target> ${CMAKE_DL_LIBS})
43...
44~~~
32 45
33### Linking caveat 46### Linking caveat
34This library uses the Process Status API in Windows (`psapi.lib`). If you are 47This library uses the Process Status API in Windows (`psapi.lib`). If you are