update CMakeLists.txt

CMakeLists.txt: always includes minissdpc.c
This commit is contained in:
Thomas Bernard 2021-08-12 23:39:18 +02:00
parent 92b1c8198d
commit 4975eeabe2
No known key found for this signature in database
GPG Key ID: DB511043A31ACAAF

View File

@ -56,27 +56,23 @@ configure_file (${CMAKE_CURRENT_SOURCE_DIR}/miniupnpcstrings.h.cmake ${CMAKE_CUR
target_include_directories(miniupnpc-private INTERFACE $<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}>)
set (MINIUPNPC_SOURCES
igd_desc_parse.c
miniupnpc.c
minixml.c
minisoap.c
minissdpc.c
miniwget.c
upnpcommands.c
upnpdev.c
upnpreplyparse.c
upnperrors.c
connecthostport.c
portlistingparse.c
receivedata.c
addr_is_reserved.c
src/igd_desc_parse.c
src/miniupnpc.c
src/minixml.c
src/minisoap.c
src/minissdpc.c
src/miniwget.c
src/upnpcommands.c
src/upnpdev.c
src/upnpreplyparse.c
src/upnperrors.c
src/connecthostport.c
src/portlistingparse.c
src/receivedata.c
src/addr_is_reserved.c
${CMAKE_CURRENT_BINARY_DIR}/miniupnpcstrings.h
)
if (NOT WIN32 AND NOT CMAKE_SYSTEM_NAME STREQUAL "AmigaOS")
set (MINIUPNPC_SOURCES ${MINIUPNPC_SOURCES} minissdpc.c)
endif ()
if (WIN32)
target_link_libraries(miniupnpc-private INTERFACE ws2_32 iphlpapi)
elseif (CMAKE_SYSTEM_NAME STREQUAL "SunOS")
@ -131,7 +127,7 @@ if (UPNPC_BUILD_STATIC)
endif()
if (UPNPC_BUILD_SAMPLE)
add_executable (upnpc-static upnpc.c)
add_executable (upnpc-static src/upnpc.c)
target_link_libraries (upnpc-static PRIVATE libminiupnpc-static)
target_include_directories(upnpc-static PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
endif ()
@ -168,12 +164,12 @@ if (UPNPC_BUILD_SHARED)
endif()
if (UPNPC_BUILD_SAMPLE)
add_executable (upnpc-shared upnpc.c)
add_executable (upnpc-shared src/upnpc.c)
target_link_libraries (upnpc-shared PRIVATE libminiupnpc-shared)
target_include_directories(upnpc-shared PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
endif ()
add_executable (listdevices listdevices.c)
add_executable (listdevices src/listdevices.c)
target_link_libraries (listdevices PRIVATE libminiupnpc-shared)
target_include_directories(listdevices PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
endif ()
@ -183,40 +179,40 @@ if (UPNPC_BUILD_TESTS)
target_link_libraries(miniupnpc-tests INTERFACE miniupnpc-private)
target_compile_definitions(miniupnpc-tests INTERFACE MINIUPNP_STATICLIB)
add_executable (testminixml testminixml.c minixml.c igd_desc_parse.c)
add_executable (testminixml src/testminixml.c src/minixml.c src/igd_desc_parse.c)
target_include_directories (testminixml PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
target_link_libraries (testminixml PRIVATE miniupnpc-tests)
add_executable (minixmlvalid minixmlvalid.c minixml.c)
add_executable (minixmlvalid src/minixmlvalid.c src/minixml.c)
target_link_libraries (minixmlvalid PRIVATE miniupnpc-tests)
add_executable (testupnpreplyparse testupnpreplyparse.c
minixml.c upnpreplyparse.c)
add_executable (testupnpreplyparse src/testupnpreplyparse.c
src/minixml.c src/upnpreplyparse.c)
target_include_directories (testupnpreplyparse PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
target_link_libraries (testupnpreplyparse PRIVATE miniupnpc-tests)
add_executable (testigddescparse testigddescparse.c
igd_desc_parse.c minixml.c miniupnpc.c miniwget.c minissdpc.c
upnpcommands.c upnpreplyparse.c minisoap.c connecthostport.c
portlistingparse.c receivedata.c addr_is_reserved.c
add_executable (testigddescparse src/testigddescparse.c
src/igd_desc_parse.c src/minixml.c src/miniupnpc.c src/miniwget.c src/minissdpc.c
src/upnpcommands.c src/upnpreplyparse.c src/minisoap.c src/connecthostport.c
src/portlistingparse.c src/receivedata.c src/addr_is_reserved.c
)
target_include_directories (testigddescparse PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
target_link_libraries (testigddescparse PRIVATE miniupnpc-tests)
add_executable (testminiwget testminiwget.c
miniwget.c miniupnpc.c minisoap.c upnpcommands.c minissdpc.c
upnpreplyparse.c minixml.c igd_desc_parse.c connecthostport.c
portlistingparse.c receivedata.c addr_is_reserved.c
add_executable (testminiwget src/testminiwget.c
src/miniwget.c src/miniupnpc.c src/minisoap.c src/upnpcommands.c src/minissdpc.c
src/upnpreplyparse.c src/minixml.c src/igd_desc_parse.c src/connecthostport.c
src/portlistingparse.c src/receivedata.c src/addr_is_reserved.c
)
target_include_directories (testminiwget PRIVATE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>)
target_link_libraries (testminiwget PRIVATE miniupnpc-tests)
add_executable (testaddr_is_reserved testaddr_is_reserved.c
addr_is_reserved.c
add_executable (testaddr_is_reserved src/testaddr_is_reserved.c
src/addr_is_reserved.c
)
target_link_libraries (testaddr_is_reserved PRIVATE miniupnpc-tests)