mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-14 12:41:24 +08:00
[miniupnpc] initial port of miniupnpc
This commit is contained in:
parent
f1eb3aa4b9
commit
12151fbce6
3
ports/miniupnpc/CONTROL
Normal file
3
ports/miniupnpc/CONTROL
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
Source: miniupnpc
|
||||||
|
Version: 2.1
|
||||||
|
Description: UPnP client library/tool to access Internet Gateway Devices
|
11
ports/miniupnpc/cmakelists.diff
Normal file
11
ports/miniupnpc/cmakelists.diff
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
--- a/miniupnpc/CMakeLists.txt 2018-05-07 13:12:58.000000000 +0200
|
||||||
|
+++ b/miniupnpc/CMakeLists.txt 2018-11-13 11:51:57.897598000 +0100
|
||||||
|
@@ -124,7 +124,7 @@
|
||||||
|
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()
|
31
ports/miniupnpc/portfile.cmake
Normal file
31
ports/miniupnpc/portfile.cmake
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
include(vcpkg_common_functions)
|
||||||
|
|
||||||
|
vcpkg_from_github(
|
||||||
|
OUT_SOURCE_PATH SOURCE_PATH
|
||||||
|
REPO miniupnp/miniupnp
|
||||||
|
REF miniupnpc_2_1
|
||||||
|
SHA512 f2ab5116c094982f7838ccab460d3db07a99de1094448277fc45841e0e64ea1b4216d75a7e5dd471c79ff9b0132b89e4d801c3ad1b60d55631c12c916df658f5
|
||||||
|
HEAD_REF master
|
||||||
|
)
|
||||||
|
|
||||||
|
vcpkg_apply_patches(SOURCE_PATH ${SOURCE_PATH}
|
||||||
|
PATCHES ${CMAKE_CURRENT_LIST_DIR}/cmakelists.diff)
|
||||||
|
|
||||||
|
string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "dynamic" MINIUPNPC_BUILD_SHARED)
|
||||||
|
string(COMPARE EQUAL ${VCPKG_LIBRARY_LINKAGE} "static" MINIUPNPC_BUILD_STATIC)
|
||||||
|
|
||||||
|
vcpkg_configure_cmake(
|
||||||
|
SOURCE_PATH ${SOURCE_PATH}/miniupnpc
|
||||||
|
PREFER_NINJA # Disable this option if project cannot be built with Ninja
|
||||||
|
OPTIONS
|
||||||
|
-DUPNPC_BUILD_STATIC=${MINIUPNPC_BUILD_STATIC}
|
||||||
|
-DUPNPC_BUILD_SHARED=${MINIUPNPC_BUILD_SHARED}
|
||||||
|
-DUPNPC_BUILD_TESTS=OFF
|
||||||
|
-DUPNPC_BUILD_SAMPLE=OFF
|
||||||
|
)
|
||||||
|
|
||||||
|
vcpkg_install_cmake()
|
||||||
|
|
||||||
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||||
|
file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/miniupnpc RENAME copyright)
|
||||||
|
|
Loading…
x
Reference in New Issue
Block a user