From 232a7ff0108b52ac7674522c55bf9b0cd0035c39 Mon Sep 17 00:00:00 2001 From: Jeff Becker Date: Mon, 11 Mar 2019 09:01:53 -0400 Subject: [PATCH] more --- llarp/CMakeLists.txt | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/llarp/CMakeLists.txt b/llarp/CMakeLists.txt index 5ca41df34..a7b1685e7 100644 --- a/llarp/CMakeLists.txt +++ b/llarp/CMakeLists.txt @@ -203,17 +203,18 @@ set(LIB_SRC service/types.cpp service/vanity.cpp ) - -add_library(${STATIC_LIB} STATIC ${LIB_SRC}) -target_link_libraries(${STATIC_LIB} PUBLIC ${ABYSS_LIB} ${PLATFORM_LIB} ${UTIL_LIB} ${CRYPTOGRAPHY_LIB} libutp ${LIBS}) - if(TESTNET) - target_sources(${STATIC_LIB} PUBLIC testnet.c) + set(LIB_SRC ${LIB_SRC} testnet.c) endif() +add_library(${STATIC_LIB} STATIC ${LIB_SRC}) +set(LIBS ${LIBS} libutp) +target_link_libraries(${STATIC_LIB} PUBLIC ${ABYSS_LIB} ${PLATFORM_LIB} ${UTIL_LIB} ${CRYPTOGRAPHY_LIB} ${LIBS}) + if(WITH_SHARED) add_library(${SHARED_LIB} SHARED ${LIB_SRC}) - target_link_libraries(${SHARED_LIB} PUBLIC ${ABYSS_LIB} ${CRYPTOGRAPHY_LIB} ${LIBS} ${UTIL_LIB} ${PLATFORM_LIB} Threads::Threads) + set(LIBS ${LIBS} Threads::Threads) + target_link_libraries(${SHARED_LIB} PUBLIC ${ABYSS_LIB} ${CRYPTOGRAPHY_LIB} ${UTIL_LIB} ${PLATFORM_LIB} ${LIBS}) if (WIN32) target_link_libraries(${SHARED_LIB} PUBLIC ws2_32 iphlpapi) else()