vcpkg/ports/xlsxio/portfile.cmake
Jack·Boos·Yu 3beaa7d849
[xlsxio] Export official targets (#25575)
* [xlsxio] Export unofficial targets

* version

* Add license

* version

* Use official changes instead

* version

* Apply suggestions

* version
2022-07-06 13:55:52 -07:00

45 lines
1.3 KiB
CMake

vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO brechtsanders/xlsxio
REF e3acace39e5fb153f5ce3500a4952c2bf93175bd
SHA512 8148b89c43cf45653c583d51fb8050714d3cd0a76ab9a05d46604f3671a06487e4fc58d3f6f9f2a9f9b57a9f9fe1863ef07017c74197f151390576c5aac360ea
HEAD_REF master
PATCHES
fix-dependencies.patch
export-targets.patch # https://github.com/brechtsanders/xlsxio/pull/105
)
file(REMOVE "${SOURCE_PATH}/CMake/FindMinizip.cmake")
vcpkg_check_features(
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
libzip WITH_LIBZIP
)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BUILD_STATIC)
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_SHARED)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
-DBUILD_SHARED=${BUILD_SHARED}
-DBUILD_STATIC=${BUILD_STATIC}
-DWITH_WIDE=OFF
-DBUILD_DOCUMENTATION=OFF
-DBUILD_EXAMPLES=OFF
-DBUILD_PC_FILES=OFF
-DBUILD_TOOLS=OFF
)
vcpkg_cmake_install()
vcpkg_copy_pdbs()
vcpkg_cmake_config_fixup(CONFIG_PATH cmake)
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)