From 16eafed1c82ed1355b4dd60cf763f05e37f91c3d Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Tue, 13 Jun 2023 00:37:03 +0200 Subject: [PATCH] CMakeLists.txt: doesn't build minihttptestserver under windows --- miniupnpc/CMakeLists.txt | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/miniupnpc/CMakeLists.txt b/miniupnpc/CMakeLists.txt index cfe9eee..b3d63b4 100644 --- a/miniupnpc/CMakeLists.txt +++ b/miniupnpc/CMakeLists.txt @@ -243,7 +243,9 @@ if (UPNPC_BUILD_TESTS) $) target_link_libraries (testportlistingparse PRIVATE miniupnpc-tests) - add_executable (minihttptestserver src/minihttptestserver.c) + if (NOT WIN32) + add_executable (minihttptestserver src/minihttptestserver.c) + endif() # set (UPNPC_INSTALL_TARGETS ${UPNPC_INSTALL_TARGETS} testminixml minixmlvalid testupnpreplyparse testigddescparse testminiwget) include(CTest) @@ -251,10 +253,12 @@ if (UPNPC_BUILD_TESTS) COMMAND minixmlvalid) add_test(NAME validateminiwget COMMAND ${CMAKE_SOURCE_DIR}/testminiwget.sh) - set_property(TEST validateminiwget - PROPERTY ENVIRONMENT - TESTSERVER=${CMAKE_BINARY_DIR}/minihttptestserver - TESTMINIWGET=${CMAKE_BINARY_DIR}/testminiwget) + if (NOT WIN32) + set_property(TEST validateminiwget + PROPERTY ENVIRONMENT + TESTSERVER=${CMAKE_BINARY_DIR}/minihttptestserver + TESTMINIWGET=${CMAKE_BINARY_DIR}/testminiwget) + endif() add_test(NAME validateupnpreplyparse COMMAND ${CMAKE_SOURCE_DIR}/testupnpreplyparse.sh WORKING_DIRECTORY ${CMAKE_SOURCE_DIR})