diff options
author | Silvio Traversaro <pegua1@gmail.com> | 2017-08-24 21:43:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-08-24 21:43:59 +0100 |
commit | de4a39d3c77f24c080adaba5546c75a7f4899fc1 (patch) | |
tree | 35c066f869578161818a78afa86b11577f2767db | |
parent | 2d03bf631daefa0157176697074b66f9d760e4b5 (diff) | |
download | dlfcn-win32-de4a39d3c77f24c080adaba5546c75a7f4899fc1.tar.gz dlfcn-win32-de4a39d3c77f24c080adaba5546c75a7f4899fc1.tar.bz2 dlfcn-win32-de4a39d3c77f24c080adaba5546c75a7f4899fc1.zip |
Document how to use the library when using CMake
-rw-r--r-- | README.md | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -20,6 +20,17 @@ http://www.opengroup.org/onlinepubs/009695399/functions/dlopen.html | |||
20 | Using This Library | 20 | Using This Library |
21 | ------------------ | 21 | ------------------ |
22 | 22 | ||
23 | ### Using CMake | ||
24 | Once the library has been installed, add to your project `CMakeLists.txt` : | ||
25 | ~~~ | ||
26 | ... | ||
27 | find_package(dlfcn-win32 REQUIRED) | ||
28 | ... | ||
29 | target_link_libraries(<target> dlfcn-win32::dl) | ||
30 | ... | ||
31 | ~~~ | ||
32 | |||
33 | ### Linking caveat | ||
23 | This library uses the Process Status API in Windows (`psapi.lib`). If you are | 34 | This library uses the Process Status API in Windows (`psapi.lib`). If you are |
24 | linking to the static `dl.lib` or `libdl.a`, then you would need to explicitly | 35 | linking to the static `dl.lib` or `libdl.a`, then you would need to explicitly |
25 | add `psapi.lib` or `-lpsapi` to your linking command, depending on if MinGW is | 36 | add `psapi.lib` or `-lpsapi` to your linking command, depending on if MinGW is |