2019-05-29 07:58:00 +08:00
|
|
|
|
2023-05-26 06:33:51 +08:00
|
|
|
vcpkg_from_github(
|
2018-11-15 07:11:41 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2020-06-27 06:06:30 +08:00
|
|
|
REPO podofo/podofo
|
2023-05-26 06:33:51 +08:00
|
|
|
REF "${VERSION}"
|
|
|
|
SHA512 674024af031392253bc9ea02e392fa7b4a5c8894f3129e05f27133774ccf8b696e225789e886dedbe90bc2323c318b76e79857453a56d6014d7a5514e3f861a2
|
2019-05-29 07:58:00 +08:00
|
|
|
PATCHES
|
2022-06-21 05:20:21 +08:00
|
|
|
install-cmake-config.patch
|
2018-11-15 07:11:41 +08:00
|
|
|
)
|
2017-05-08 19:45:27 +08:00
|
|
|
|
2023-05-31 09:28:05 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
fontconfig CMAKE_REQUIRE_FIND_PACKAGE_Fontconfig
|
|
|
|
INVERTED_FEATURES
|
|
|
|
fontconfig CMAKE_DISABLE_FIND_PACKAGE_Fontconfig
|
|
|
|
)
|
2018-05-18 14:35:20 +08:00
|
|
|
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" PODOFO_BUILD_STATIC)
|
|
|
|
|
2022-06-21 05:20:21 +08:00
|
|
|
file(REMOVE "${SOURCE_PATH}/cmake/modules/FindOpenSSL.cmake")
|
|
|
|
file(REMOVE "${SOURCE_PATH}/cmake/modules/FindZLIB.cmake")
|
2019-05-25 03:12:03 +08:00
|
|
|
|
2022-06-21 05:20:21 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2018-05-18 14:35:20 +08:00
|
|
|
OPTIONS
|
2023-05-31 09:28:05 +08:00
|
|
|
${FEATURE_OPTIONS}
|
|
|
|
-DPKG_CONFIG_FOUND=true # enable pc file for shared linkage
|
2018-05-18 14:35:20 +08:00
|
|
|
-DPODOFO_BUILD_LIB_ONLY=1
|
|
|
|
-DPODOFO_BUILD_STATIC=${PODOFO_BUILD_STATIC}
|
2023-05-31 09:28:05 +08:00
|
|
|
-DCMAKE_DISABLE_FIND_PACKAGE_Libidn=ON
|
2018-05-18 14:35:20 +08:00
|
|
|
)
|
|
|
|
|
2022-06-21 05:20:21 +08:00
|
|
|
vcpkg_cmake_install()
|
2022-06-28 05:03:59 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2022-06-21 05:20:21 +08:00
|
|
|
|
2023-05-26 06:33:51 +08:00
|
|
|
vcpkg_replace_string( "${CURRENT_PACKAGES_DIR}/share/${PORT}/podofo-config.cmake"
|
2023-05-31 09:28:05 +08:00
|
|
|
"# Generated by CMake"
|
|
|
|
"include(CMakeFindDependencyMacro)
|
|
|
|
find_dependency(Freetype)
|
|
|
|
find_dependency(JPEG)
|
|
|
|
find_dependency(LibXml2)
|
2022-06-21 05:20:21 +08:00
|
|
|
find_dependency(OpenSSL)
|
2023-05-31 09:28:05 +08:00
|
|
|
find_dependency(PNG)
|
|
|
|
find_dependency(TIFF)
|
|
|
|
find_dependency(ZLIB)
|
|
|
|
if(\"${CMAKE_REQUIRE_FIND_PACKAGE_Fontconfig}\")
|
|
|
|
find_dependency(Fontconfig)
|
|
|
|
endif()
|
|
|
|
\n# Generated by CMake")
|
2022-06-21 05:20:21 +08:00
|
|
|
|
2022-06-28 05:03:59 +08:00
|
|
|
vcpkg_cmake_config_fixup()
|
2023-05-31 09:28:05 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2022-06-28 05:03:59 +08:00
|
|
|
|
2022-06-21 05:20:21 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2017-05-08 19:45:27 +08:00
|
|
|
|
|
|
|
# Handle copyright
|
2023-05-26 06:33:51 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
|
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|