diff options
Diffstat (limited to 'vcpkg/ports/miniupnpc')
| -rw-r--r-- | vcpkg/ports/miniupnpc/portfile.cmake | 38 | ||||
| -rw-r--r-- | vcpkg/ports/miniupnpc/vcpkg.json | 16 |
2 files changed, 54 insertions, 0 deletions
diff --git a/vcpkg/ports/miniupnpc/portfile.cmake b/vcpkg/ports/miniupnpc/portfile.cmake new file mode 100644 index 0000000..99dcbbd --- /dev/null +++ b/vcpkg/ports/miniupnpc/portfile.cmake @@ -0,0 +1,38 @@ +string(REPLACE "." "_" MINIUPNPC_VERSION "${VERSION}")
+vcpkg_from_github(
+ OUT_SOURCE_PATH SOURCE_PATH
+ REPO miniupnp/miniupnp
+ REF "miniupnpc_${MINIUPNPC_VERSION}"
+ SHA512 f8c79d2fb19de0ec3d053200320abf2ce3f7552b04f8f3f0b175577ee93e6c0bfb5c18a863197216436ebe9d44dd429fba407e0da83a1270dd3d46b380ac6ee1
+ HEAD_REF master
+)
+
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" MINIUPNPC_BUILD_SHARED)
+string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" MINIUPNPC_BUILD_STATIC)
+
+vcpkg_cmake_configure(
+ SOURCE_PATH "${SOURCE_PATH}/miniupnpc"
+ OPTIONS
+ -DUPNPC_BUILD_STATIC=${MINIUPNPC_BUILD_STATIC}
+ -DUPNPC_BUILD_SHARED=${MINIUPNPC_BUILD_SHARED}
+ -DUPNPC_BUILD_TESTS=OFF
+ -DUPNPC_BUILD_SAMPLE=OFF
+)
+
+vcpkg_cmake_install()
+vcpkg_copy_pdbs()
+
+vcpkg_cmake_config_fixup(CONFIG_PATH "/lib/cmake/${PORT}")
+vcpkg_fixup_pkgconfig()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+ file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
+else()
+ file(GLOB RELEASE_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*.exe")
+ if(${RELEASE_TOOLS})
+ vcpkg_copy_tools(TOOL_NAMES ${RELEASE_TOOLS} AUTO_CLEAN)
+ endif()
+endif()
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
diff --git a/vcpkg/ports/miniupnpc/vcpkg.json b/vcpkg/ports/miniupnpc/vcpkg.json new file mode 100644 index 0000000..78786eb --- /dev/null +++ b/vcpkg/ports/miniupnpc/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "miniupnpc", + "version": "2.3.2", + "description": "UPnP client library/tool to access Internet Gateway Devices", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} |