Skip to content

Commit a6b849f

Browse files
committed
Update README.md with download instructions
1 parent 91baee5 commit a6b849f

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

README.md

+13-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,19 @@ UDP port mappings on IGD (v1 and v2) devices.
1616

1717
### Include in your project
1818

19-
Please have a look into [example/CMakeLists.txt](example/CMakeLists.txt)
19+
If you have sources of CPPUPnP somewhere on your disk, simply set the
20+
`CPPUPnP_DIR` variable to point to that CPPUPnP's directory as is done in the
21+
[example/CMakeLists.txt](example/CMakeLists.txt)
22+
23+
If you don't have CPPUPnP on your disk, have cmake download it prior to calling
24+
`find_package(CPPUPnP REQUIRED)` like so:
25+
26+
include(FetchContent)
27+
fetchcontent_declare(CPPUPnP GIT_REPOSITORY <CPPUPnP-GIT-Repository>)
28+
fetchcontent_makeavailable(CPPUPnP)
29+
30+
set(CPPUPnP_DIR ${CMAKE_BINARY_DIR}/_deps/cppupnp-src)
31+
find_package(CPPUPnP REQUIRED)
2032

2133
### Build examples and tests
2234

0 commit comments

Comments
 (0)