CMakeLists.txt: doesn't build minihttptestserver under windows

This commit is contained in:
Thomas Bernard 2023-06-13 00:37:03 +02:00
parent daa90d3c5e
commit 16eafed1c8
1 changed files with 9 additions and 5 deletions

View File

@ -243,7 +243,9 @@ if (UPNPC_BUILD_TESTS)
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
target_link_libraries (testportlistingparse PRIVATE miniupnpc-tests)
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)
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})