vcpkg/ports/zint/portfile.cmake

43 lines
1.2 KiB
CMake
Raw Normal View History

2022-11-24 02:35:36 +08:00
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO zint/zint
2022-12-20 06:31:53 +08:00
REF 2.12.0
SHA512 398502efc1f07718e7c86a1e91f6e94c88b7f7c5e3c59fd507f3a5966488f4b0bb230ae9696515583aa536e2357c9a6295be7de6b4bc83daf5b4eb3be5e69b24
2022-11-24 02:35:36 +08:00
HEAD_REF master
PATCHES
2022-12-20 06:31:53 +08:00
0004-windows-static-build.patch
0005-export-include-directories.patch
2022-11-24 02:35:36 +08:00
)
vcpkg_check_features(
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
png ZINT_USE_PNG
)
2022-12-20 06:31:53 +08:00
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" ZINT_STATIC)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" ZINT_SHARED)
2022-11-24 02:35:36 +08:00
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
2022-12-20 06:31:53 +08:00
-DZINT_STATIC=${ZINT_STATIC}
-DZINT_SHARED=${ZINT_SHARED}
2022-11-24 02:35:36 +08:00
-DZINT_USE_QT=OFF
-DZINT_TEST=OFF
)
vcpkg_cmake_install()
2022-12-20 06:31:53 +08:00
vcpkg_cmake_config_fixup()
2022-11-24 02:35:36 +08:00
vcpkg_copy_pdbs()
vcpkg_copy_tools(TOOL_NAMES zint AUTO_CLEAN)
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/man")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/apps")
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE")