mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-25 06:37:49 +08:00
87d5f800a6
- [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.~ - [x] 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. Co-authored-by: Jean-Louis Leroy <jll63@users.noreply.github.com>
34 lines
1.0 KiB
CMake
34 lines
1.0 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO jll63/yomm2
|
|
REF "v${VERSION}"
|
|
SHA512 cd697ece15456013b398452f881f0fd04e35aedf20169ce0a88c442af7a40dada84a6a4cabb702fc8564ece83e1966da2dedceb5598873f57ba209a0e65a440c
|
|
HEAD_REF master
|
|
)
|
|
|
|
set(YOMM2_SHARED OFF)
|
|
if(VCPKG_LIBRARY_LINKAGE MATCHES "dynamic")
|
|
set(YOMM2_SHARED ON)
|
|
endif()
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE MATCHES "static")
|
|
set(VCPKG_BUILD_TYPE release) # header-only
|
|
endif()
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS
|
|
-DYOMM2_ENABLE_EXAMPLES=OFF
|
|
-DYOMM2_ENABLE_TESTS=OFF
|
|
-DYOMM2_SHARED=${YOMM2_SHARED}
|
|
)
|
|
vcpkg_cmake_install()
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/YOMM2)
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
if(VCPKG_LIBRARY_LINKAGE MATCHES "static") # header only library in static build
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib" "${CURRENT_PACKAGES_DIR}/debug")
|
|
endif()
|
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")
|