From eb328da56c3fc7167b536dcb206df0abb0f4a9b9 Mon Sep 17 00:00:00 2001 From: Garrett D'Amore Date: Fri, 13 Nov 2020 22:31:18 -0800 Subject: fixes #1087 CMakeLists structural improvements desired This doesn't modularize all the tests yet, but it goes a long way in the right direction. --- src/transport/zerotier/CMakeLists.txt | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) (limited to 'src/transport') 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() -- cgit v1.2.3-70-g09d2