2023-04-29 07:15:46 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
2019-06-26 12:44:17 +08:00
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO MediaArea/ZenLib
|
2023-04-29 07:15:46 +08:00
|
|
|
REF "v${VERSION}"
|
|
|
|
SHA512 4232eb6e73e9b380f6fe2ce3cfeb9fe343936362a35ca8d088c783dc6277332df762d689efe023e3f1418c2e6d2629e0b82ac93df9cce3ae0ab346c2ed1911f1
|
2019-06-26 12:44:17 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2023-04-29 07:15:46 +08:00
|
|
|
vcpkg_find_acquire_program(PKGCONFIG)
|
|
|
|
|
2021-12-10 10:06:35 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}/Project/CMake"
|
2023-04-29 07:15:46 +08:00
|
|
|
OPTIONS
|
|
|
|
"-DPKG_CONFIG_EXECUTABLE=${PKGCONFIG}"
|
|
|
|
-DCMAKE_REQUIRE_FIND_PACKAGE_PkgConfig=1
|
2019-06-26 12:44:17 +08:00
|
|
|
)
|
2021-12-10 10:06:35 +08:00
|
|
|
vcpkg_cmake_install()
|
2023-04-29 07:15:46 +08:00
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME zenlib)
|
2021-12-22 12:05:32 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2023-04-29 07:15:46 +08:00
|
|
|
if(NOT VCPKG_BUILD_TYPE AND VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/libzen.pc" " -lzen" " -lzend")
|
|
|
|
endif()
|
2019-06-26 12:44:17 +08:00
|
|
|
|
2021-12-10 10:06:35 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
|
2019-06-26 12:44:17 +08:00
|
|
|
|
2023-04-29 07:15:46 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/License.txt")
|