2022-08-05 10:18:37 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO libsdl-org/SDL_ttf
|
2023-02-09 05:45:58 +08:00
|
|
|
REF "release-${VERSION}"
|
2024-02-22 01:26:00 +08:00
|
|
|
SHA512 2e5dd54633c92329195370953ccf396dd4a12be30f432f46dc1c7023b3c871b8a99f5d2ca5b066ebc41fab02a070976911caeab18b08e6e4c5ab5cc3ad17be23
|
2022-08-05 10:18:37 +08:00
|
|
|
HEAD_REF main
|
2019-03-12 04:15:08 +08:00
|
|
|
)
|
|
|
|
|
2022-08-05 10:18:37 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
harfbuzz SDL2TTF_HARFBUZZ
|
2019-03-12 04:15:08 +08:00
|
|
|
)
|
2017-04-05 04:27:44 +08:00
|
|
|
|
2022-08-05 10:18:37 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
|
|
OPTIONS
|
|
|
|
-DSDL2TTF_VENDORED=OFF
|
|
|
|
-DSDL2TTF_SAMPLES=OFF
|
|
|
|
${FEATURE_OPTIONS}
|
|
|
|
)
|
2017-04-05 04:27:44 +08:00
|
|
|
|
2022-08-05 10:18:37 +08:00
|
|
|
vcpkg_cmake_install()
|
|
|
|
if(EXISTS "${CURRENT_PACKAGES_DIR}/cmake")
|
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME SDL2_ttf CONFIG_PATH cmake)
|
|
|
|
else()
|
|
|
|
vcpkg_cmake_config_fixup(PACKAGE_NAME SDL2_ttf CONFIG_PATH lib/cmake/SDL2_ttf)
|
|
|
|
endif()
|
2017-04-05 04:27:44 +08:00
|
|
|
|
2021-12-01 07:29:54 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2017-04-05 04:27:44 +08:00
|
|
|
|
2024-03-16 09:40:20 +08:00
|
|
|
if(NOT VCPKG_BUILD_TYPE)
|
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/SDL2_ttf.pc" "-lSDL2_ttf" "-lSDL2_ttfd")
|
|
|
|
endif()
|
|
|
|
|
2022-08-05 10:18:37 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/share/licenses")
|
2019-03-27 00:57:16 +08:00
|
|
|
|
2022-08-05 10:18:37 +08:00
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2024-02-22 01:26:00 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
|