diff --git a/demo/quic_mqtt/CMakeLists.txt b/demo/quic_mqtt/CMakeLists.txt index ef66f2e5..0d4be69e 100644 --- a/demo/quic_mqtt/CMakeLists.txt +++ b/demo/quic_mqtt/CMakeLists.txt @@ -11,8 +11,11 @@ cmake_minimum_required(VERSION 3.13) project(quic_client) +if (BUILD_DEMO) +else () # Call this from your own project's makefile. -find_package(nng CONFIG REQUIRED) + find_package(nng CONFIG REQUIRED) +endif (BUILD_DEMO) find_package(Threads) find_package(msquic) @@ -35,7 +38,7 @@ if(OPENSSL_FOUND) target_link_libraries(quic_client OpenSSL::Crypto OpenSSL::SSL) endif() -target_link_libraries(quic_client nng::nng msquic pthread) +target_link_libraries(quic_client nng msquic pthread) target_compile_definitions(quic_client PRIVATE NNG_ELIDE_DEPRECATED) if (NNG_ENABLE_SQLITE) diff --git a/demo/quic_mqttv5/CMakeLists.txt b/demo/quic_mqttv5/CMakeLists.txt index 011b961f..9afe456b 100644 --- a/demo/quic_mqttv5/CMakeLists.txt +++ b/demo/quic_mqttv5/CMakeLists.txt @@ -11,8 +11,11 @@ cmake_minimum_required(VERSION 3.13) project(quic_clientv5) +if (BUILD_DEMO) +else () # Call this from your own project's makefile. -find_package(nng CONFIG REQUIRED) + find_package(nng CONFIG REQUIRED) +endif (BUILD_DEMO) find_package(Threads) find_package(msquic) @@ -35,7 +38,7 @@ if(OPENSSL_FOUND) target_link_libraries(quic_client_v5 OpenSSL::Crypto OpenSSL::SSL) endif() -target_link_libraries(quic_client_v5 nng::nng msquic pthread) +target_link_libraries(quic_client_v5 nng msquic pthread) target_compile_definitions(quic_client_v5 PRIVATE NNG_ELIDE_DEPRECATED) if (NNG_ENABLE_SQLITE)