mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-16 19:17:55 +08:00
4324a46e78
<!-- If your PR fixes issues, please note that here by adding "Fixes #NNNNNN." for each fixed issue on separate lines. --> Fixes https://github.com/microsoft/vcpkg/issues/36162 Export the targets for usage. Usage test passed with following triplets: ``` x86-windows x64-windows x64-windows-static ``` <!-- If you are still working on the PR, open it as a Draft: https://github.blog/2019-02-14-introducing-draft-pull-requests/. --> - [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. <!-- If this PR adds a new port, please uncomment and fill out this checklist: - [ ] Changes comply with the [maintainer guide](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/contributing/maintainer-guide.md). - [ ] The name of the port matches an existing name for this component on https://repology.org/ if possible, and/or is strongly associated with that component on search engines. - [ ] Optional dependencies are resolved in exactly one way. For example, if the component is built with CMake, all `find_package` calls are REQUIRED, are satisfied by `vcpkg.json`'s declared dependencies, or disabled with [CMAKE_DISABLE_FIND_PACKAGE_Xxx](https://cmake.org/cmake/help/latest/variable/CMAKE_DISABLE_FIND_PACKAGE_PackageName.html). - [ ] The versioning scheme in `vcpkg.json` matches what upstream says. - [ ] The license declaration in `vcpkg.json` matches what upstream says. - [ ] The installed as the "copyright" file matches what upstream says. - [ ] The source code of the component installed comes from an authoritative source. - [ ] The generated "usage text" is accurate. See [adding-usage](https://github.com/microsoft/vcpkg-docs/blob/main/vcpkg/examples/adding-usage.md) for context. - [ ] The version database is fixed by rerunning `./vcpkg x-add-version --all` and committing the result. - [ ] Only one version is in the new port's versions file. - [ ] Only one version is added to each modified port's versions file. END OF NEW PORT CHECKLIST (delete this line) -->
40 lines
1.4 KiB
CMake
40 lines
1.4 KiB
CMake
vcpkg_download_distfile(
|
|
SYSCTL_REMOVED_PATCH
|
|
URLS https://github.com/slembcke/Chipmunk2D/commit/9a051e6fb970c7afe09ce2d564c163b81df050a8.patch?full_index=1
|
|
SHA512 54ec8766529d301ea35e8e0e7f7e9803101454d0f3655f7be87b6c81414a71e6fd269c14cf1d89902eebea78bb20526b0e4da4c53cf660d169ebabe46dadd059
|
|
FILENAME 9a051e6fb970c7afe09ce2d564c163b81df050a8.patch
|
|
)
|
|
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO slembcke/Chipmunk2D
|
|
REF "Chipmunk-${VERSION}"
|
|
SHA512 edd16544a572c8f7654c99d6420aefe2f73ce2630f3e2e969f17b4980a8ea4044b5738f4a3cefbe0edd7bb4cd039a70748773b48cd59df12a09123eca9f451e4
|
|
HEAD_REF master
|
|
PATCHES
|
|
"${SYSCTL_REMOVED_PATCH}"
|
|
export-targets.patch
|
|
)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" KEYSTONE_BUILD_STATIC)
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" KEYSTONE_BUILD_SHARED)
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS
|
|
-DBUILD_DEMOS=OFF
|
|
-DBUILD_SHARED=${KEYSTONE_BUILD_SHARED}
|
|
-DBUILD_STATIC=${KEYSTONE_BUILD_STATIC}
|
|
-DINSTALL_STATIC=${KEYSTONE_BUILD_STATIC}
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL debug)
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
endif()
|
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-chipmunk)
|
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
|