diff --git a/CMakeLists.txt b/CMakeLists.txt index 634543f..34b4ab4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -125,6 +125,9 @@ if(N2N_OPTION_USE_PORTMAPPING) add_subdirectory(${THIRD_PARTY_DIR}/libnatpmp libnatpmp) link_directories(${PROJECT_BINARY_DIR}/libnatpmp) + # Turns on the generic code for supporting either of the above + ADD_DEFINITIONS("-DHAVE_PORT_FORWARDING") + # TODO: # - this is the odd one out, is it needed? include_directories(${PROJECT_BINARY_DIR}/lib_miniupnpc) diff --git a/doc/BuildConfig.md b/doc/BuildConfig.md index 0c19985..aa3b61c 100644 --- a/doc/BuildConfig.md +++ b/doc/BuildConfig.md @@ -88,6 +88,9 @@ If the pcap library is available then the `n2n-decode` tool can be compiled. One of the two UPnP libraries, this one supports the NATPMP protocol. See also the next option. +This option depends on the library being installed - on Debian and Ubuntu, +this is `apt-get install libnatpmp-dev` + ### `--enable-miniupnp` Enables the other kind of UPnP port mapping protocol. @@ -95,6 +98,11 @@ Enables the other kind of UPnP port mapping protocol. Turning on either of these two UPnP libraries will enable UPnP support within the edge. +Both the natpmp and miniupnp depend on the pthread library being enabled. + +This option depends on the library being installed - on Debian and Ubuntu, +this is `apt-get install libminiupnpc-dev` + ### Disable Multicast Local Peer Detection For better local peer detection, the edges try to detect local peers by sending REGISTER diff --git a/scripts/cmake_all.sh b/scripts/cmake_all.sh index 843764e..74c605b 100755 --- a/scripts/cmake_all.sh +++ b/scripts/cmake_all.sh @@ -31,7 +31,7 @@ cd build # written in such a horrible language. Since it would be silly to rewrite # a one-page wrapper script in python, we submit that this check is wrong. # shellcheck disable=SC2086 -cmake $OPTS .. +cmake .. $OPTS cmake --build . --config Release