Commit de4a39d3c77f24c080adaba5546c75a7f4899fc1

Silvio Traversaro 2017-08-24T21:43:59

Document how to use the library when using CMake

diff --git a/README.md b/README.md
index 27f36e7..228bd98 100644
--- a/README.md
+++ b/README.md
@@ -20,6 +20,17 @@ http://www.opengroup.org/onlinepubs/009695399/functions/dlopen.html
 Using This Library
 ------------------
 
+### Using CMake 
+Once the library has been installed, add to your project `CMakeLists.txt` : 
+~~~
+...
+find_package(dlfcn-win32 REQUIRED)
+...
+target_link_libraries(<target> dlfcn-win32::dl)
+...
+~~~
+
+### Linking caveat  
 This library uses the Process Status API in Windows (`psapi.lib`). If you are
 linking to the static `dl.lib` or `libdl.a`, then you would need to explicitly
 add `psapi.lib` or `-lpsapi` to your linking command, depending on if MinGW is