diff options
author | dimitri staessens <dimitri.staessens@ugent.be> | 2017-09-13 17:00:55 +0200 |
---|---|---|
committer | dimitri staessens <dimitri.staessens@ugent.be> | 2017-09-13 17:22:28 +0200 |
commit | 0ed2ae85935be59b3fee5663a9906c4260cd64cc (patch) | |
tree | bddca1ad5b5a08ad6fb0a9ec096984e42afe0d38 /src/ipcpd/shim-udp/CMakeLists.txt | |
parent | 888d3dbe7c3844d2efe9d6bc9823630db5d47a3b (diff) | |
download | ouroboros-0ed2ae85935be59b3fee5663a9906c4260cd64cc.tar.gz ouroboros-0ed2ae85935be59b3fee5663a9906c4260cd64cc.zip |
build: Fix DDNS tool detection for shim-udp
This fixes output when detecting DDNS tools and homogenizes output and
the APIs used to pass variables between the build system and the
sources. Fixes some minor issues and typos).
Diffstat (limited to 'src/ipcpd/shim-udp/CMakeLists.txt')
-rw-r--r-- | src/ipcpd/shim-udp/CMakeLists.txt | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/src/ipcpd/shim-udp/CMakeLists.txt b/src/ipcpd/shim-udp/CMakeLists.txt index eff3f5d0..fb57778e 100644 --- a/src/ipcpd/shim-udp/CMakeLists.txt +++ b/src/ipcpd/shim-udp/CMakeLists.txt @@ -38,17 +38,25 @@ find_program(NSLOOKUP_EXECUTABLE mark_as_advanced(NSLOOKUP_EXECUTABLE NSUPDATE_EXECUTABLE) -include(AddCompileFlags) -if (NOT NSUPDATE_EXECUTABLE) - message(STATUS "Could not find nsupdate. Disabling DDNS functionality.") -elseif (NOT NSLOOKUP_EXECUTABLE) - message(STATUS "Could not find nslookup. Disabling DNS lookups.") +if (NSLOOKUP_EXECUTABLE AND NSUPDATE_EXECUTABLE) + set(DISABLE_DDNS FALSE CACHE BOOL "Disable DDNS support") + if (NOT DISABLE_DNS) + message(STATUS "DDNS support enabled") + set(HAVE_DDNS TRUE CACHE INTERNAL "") + else () + message(STATUS "DDNS support disabled by user") + endif () else () - message(STATUS "Found nsupdate: ${NSUPDATE_EXECUTABLE}") - message(STATUS "Found nslookup: ${NSLOOKUP_EXECUTABLE}") - add_compile_flags(ipcpd-shim-udp -DCONFIG_OUROBOROS_ENABLE_DNS) + if (NSLOOKUP_EXECUTABLE) + message(STATUS "Install nsupdate to enable DDNS support") + elseif (NSUPDATE_EXECUTABLE) + message(STATUS "Install nslookup to enable DDNS support") + else () + message(STATUS "Install nslookup and nsupdate to enable DDNS support") + endif () endif () +include(AddCompileFlags) if (CMAKE_BUILD_TYPE MATCHES Debug) add_compile_flags(ipcpd-shim-udp -DCONFIG_OUROBOROS_DEBUG) endif (CMAKE_BUILD_TYPE MATCHES Debug) |