From db0e09407da432c7ce953ecc7938b835023edeec Mon Sep 17 00:00:00 2001 From: anonimal Date: Wed, 25 Sep 2019 22:36:53 +0000 Subject: [PATCH 1/3] miniupnpc: add BUILD_INTERFACE generator expression to static target Needed for exporting target dependencies to superproject when installing. This is *not* included upstream (miniupnp/miniupnp) and may want to be PR'd. --- miniupnpc/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/miniupnpc/CMakeLists.txt b/miniupnpc/CMakeLists.txt index 38d02024..67325332 100644 --- a/miniupnpc/CMakeLists.txt +++ b/miniupnpc/CMakeLists.txt @@ -74,7 +74,7 @@ if (MSVC) endif() configure_file (${CMAKE_CURRENT_SOURCE_DIR}/miniupnpcstrings.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/miniupnpcstrings.h) -target_include_directories(miniupnpc-private INTERFACE ${CMAKE_CURRENT_BINARY_DIR}) +target_include_directories(miniupnpc-private INTERFACE "$") set (MINIUPNPC_SOURCES igd_desc_parse.c @@ -125,7 +125,7 @@ if (UPNPC_BUILD_STATIC) add_library (libminiupnpc-static STATIC ${MINIUPNPC_SOURCES}) set_target_properties (libminiupnpc-static PROPERTIES OUTPUT_NAME "miniupnpc") target_link_libraries (libminiupnpc-static PRIVATE miniupnpc-private) - target_include_directories(libminiupnpc-static INTERFACE ../${CMAKE_CURRENT_SOURCE_DIR}) + target_include_directories(libminiupnpc-static INTERFACE "$") target_compile_definitions(libminiupnpc-static PUBLIC MINIUPNP_STATICLIB) install (TARGETS libminiupnpc-static From 8397314e2b78200a6cda72b3ba2f5f73b3153cb6 Mon Sep 17 00:00:00 2001 From: anonimal Date: Fri, 18 Oct 2019 05:19:46 +0000 Subject: [PATCH 2/3] miniupnpc: fix wrong target when building shared lib This fix *is* included in the miniupnp master branch but, since there currently hasn't been a release since 2.1, and there's no other need to build against the master branch, we'll continue to build against the latest tagged release. --- miniupnpc/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniupnpc/CMakeLists.txt b/miniupnpc/CMakeLists.txt index 67325332..f4e0480e 100644 --- a/miniupnpc/CMakeLists.txt +++ b/miniupnpc/CMakeLists.txt @@ -148,7 +148,7 @@ if (UPNPC_BUILD_SHARED) target_link_libraries (libminiupnpc-shared PRIVATE miniupnpc-private) target_compile_definitions(libminiupnpc-shared PRIVATE MINIUPNP_EXPORTS) - target_include_directories(libminiupnpc-static INTERFACE ../${CMAKE_CURRENT_SOURCE_DIR}) + target_include_directories(libminiupnpc-shared INTERFACE ../${CMAKE_CURRENT_SOURCE_DIR}) if (WIN32) target_link_libraries(libminiupnpc-shared INTERFACE ws2_32 iphlpapi) endif() From 5bdb473e3badaedf351bb6fb6eca4419fd3ff888 Mon Sep 17 00:00:00 2001 From: anonimal Date: Fri, 18 Oct 2019 06:38:21 +0000 Subject: [PATCH 3/3] miniupnpc: add BUILD_INTERFACE generator expression to shared target Needed for exporting target dependencies to superproject when installing. This is *not* included upstream (miniupnp/miniupnp) and may want to be PR'd. --- miniupnpc/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/miniupnpc/CMakeLists.txt b/miniupnpc/CMakeLists.txt index f4e0480e..1489bb82 100644 --- a/miniupnpc/CMakeLists.txt +++ b/miniupnpc/CMakeLists.txt @@ -148,7 +148,7 @@ if (UPNPC_BUILD_SHARED) target_link_libraries (libminiupnpc-shared PRIVATE miniupnpc-private) target_compile_definitions(libminiupnpc-shared PRIVATE MINIUPNP_EXPORTS) - target_include_directories(libminiupnpc-shared INTERFACE ../${CMAKE_CURRENT_SOURCE_DIR}) + target_include_directories(libminiupnpc-shared INTERFACE "$") if (WIN32) target_link_libraries(libminiupnpc-shared INTERFACE ws2_32 iphlpapi) endif()