aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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