aboutsummaryrefslogtreecommitdiff
path: root/src/transport
diff options
context:
space:
mode:
authorGarrett D'Amore <garrett@damore.org>2020-11-13 22:31:18 -0800
committerGarrett D'Amore <garrett@damore.org>2020-11-14 21:31:43 -0800
commiteb328da56c3fc7167b536dcb206df0abb0f4a9b9 (patch)
treec92e3dd3db6a0f1b0efc6a027e7e4db6442068f0 /src/transport
parent7c1ff5ed1e48af413494b9070cccf79f3858b749 (diff)
downloadnng-eb328da56c3fc7167b536dcb206df0abb0f4a9b9.tar.gz
nng-eb328da56c3fc7167b536dcb206df0abb0f4a9b9.tar.bz2
nng-eb328da56c3fc7167b536dcb206df0abb0f4a9b9.zip
fixes #1087 CMakeLists structural improvements desired
This doesn't modularize all the tests yet, but it goes a long way in the right direction.
Diffstat (limited to 'src/transport')
-rw-r--r--src/transport/zerotier/CMakeLists.txt20
1 files changed, 4 insertions, 16 deletions
diff --git a/src/transport/zerotier/CMakeLists.txt b/src/transport/zerotier/CMakeLists.txt
index bc8673c5..167a98c0 100644
--- a/src/transport/zerotier/CMakeLists.txt
+++ b/src/transport/zerotier/CMakeLists.txt
@@ -15,10 +15,6 @@ mark_as_advanced(NNG_TRANSPORT_ZEROTIER)
if (NNG_TRANSPORT_ZEROTIER)
- # The zerotiercore project will have been found at the top level
- # of the package. This is necessary because import libraries cannot
- # percolate back to the parent tree.
-
# NB: As we wind up linking libzerotiercore.a into the application,
# this means that your application will *also* need to either be licensed
# under the GPLv3, or you will need to have a commercial license from
@@ -31,17 +27,9 @@ if (NNG_TRANSPORT_ZEROTIER)
************************************************************")
find_package(zerotiercore REQUIRED)
- set(_PKGS zerotiercore)
- set(_LIBS zerotiercore::zerotiercore)
- set(_DEFS -DNNG_TRANSPORT_ZEROTIER)
-
- set(_SRCS transport/zerotier/zerotier.c
- transport/zerotier/zthash.c
- ${PROJECT_SOURCE_DIR}/include/nng/transport/zerotier/zerotier.h)
-
- set(NNG_DEFS ${NNG_DEFS} ${_DEFS} PARENT_SCOPE)
- set(NNG_LIBS ${NNG_LIBS} ${_LIBS} PARENT_SCOPE)
- set(NNG_PKGS ${NNG_PKGS} ${_PKGS} PARENT_SCOPE)
- set(NNG_SRCS ${NNG_SRCS} ${_SRCS} PARENT_SCOPE)
+ nng_link_libraries(zerotiercore::zerotiercore)
+ nng_defines(NNG_TRANSPORT_ZEROTIER)
+ nng_sources(zerotier.c zthash.c)
+ nng_headers(nng/transport/zerotier/zerotier.h)
endif()