2023-09-06 13:35:09 +08:00
|
|
|
string(REPLACE "." "_" MINIUPNPC_VERSION "${VERSION}")
|
2018-11-15 16:28:43 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO miniupnp/miniupnp
|
2024-08-23 18:03:58 +08:00
|
|
|
REF "miniupnpd_${MINIUPNPC_VERSION}"
|
|
|
|
SHA512 f461b57446d9086e8fc2caf6ef202a78d204b2580d6096aca63234fda53302cad03840b14cc0d8b68e9033049b749be46e35c3737cc6cbcd2ad30c59b737a390
|
2018-11-15 16:28:43 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" MINIUPNPC_BUILD_SHARED)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" MINIUPNPC_BUILD_STATIC)
|
2018-11-15 16:28:43 +08:00
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}/miniupnpc"
|
2018-11-15 16:28:43 +08:00
|
|
|
OPTIONS
|
|
|
|
-DUPNPC_BUILD_STATIC=${MINIUPNPC_BUILD_STATIC}
|
|
|
|
-DUPNPC_BUILD_SHARED=${MINIUPNPC_BUILD_SHARED}
|
|
|
|
-DUPNPC_BUILD_TESTS=OFF
|
|
|
|
-DUPNPC_BUILD_SAMPLE=OFF
|
|
|
|
)
|
|
|
|
|
2023-03-08 06:14:52 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_copy_pdbs()
|
2018-11-15 16:28:43 +08:00
|
|
|
|
2023-09-06 13:35:09 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH "/lib/cmake/${PORT}")
|
|
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
2023-03-08 06:14:52 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2023-09-06 13:35:09 +08:00
|
|
|
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")
|
2024-08-23 18:03:58 +08:00
|
|
|
if(${RELEASE_TOOLS})
|
|
|
|
vcpkg_copy_tools(TOOL_NAMES ${RELEASE_TOOLS} AUTO_CLEAN)
|
|
|
|
endif()
|
2023-09-06 13:35:09 +08:00
|
|
|
endif()
|
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|