mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-01 14:29:00 +08:00
247256f1c5
- [X] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md) - [X] SHA512s are updated for each updated download - [ ] ~The "supports" clause reflects platforms that may be fixed by this new version~ - [ ] ~Any fixed [CI baseline](https://github.com/microsoft/vcpkg/blob/master/scripts/ci.baseline.txt) entries are removed from that file.~ - [ ] ~Any patches that are no longer applied are deleted from the port's directory.~ - [X] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [X] Only one version is added to each modified port's versions file.
43 lines
1.6 KiB
CMake
43 lines
1.6 KiB
CMake
string(REPLACE "." "_" MINIUPNPC_VERSION "${VERSION}")
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO miniupnp/miniupnp
|
|
REF "miniupnpc_${MINIUPNPC_VERSION}"
|
|
SHA512 2f1fcd2d2820f649b832e1e0d6b826a812ee84f634460acb3b4af15338488fe3889bb8929c38a91a4f9786a5232177df479d874a388230723d27ae708d3b2592
|
|
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 DEBUG_TOOLS "${CURRENT_PACKAGES_DIR}/debug/bin/*.exe")
|
|
file(GLOB RELEASE_TOOLS "${CURRENT_PACKAGES_DIR}/bin/*.exe")
|
|
file(
|
|
INSTALL ${RELEASE_TOOLS}
|
|
DESTINATION "${CURRENT_PACKAGES_DIR}/tools/${PORT}"
|
|
)
|
|
vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}")
|
|
file(REMOVE ${DEBUG_TOOLS} ${RELEASE_TOOLS})
|
|
endif()
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|