2021-01-17 11:33:51 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO Chlumsky/msdfgen
|
2024-06-19 02:58:53 +08:00
|
|
|
REF "v${VERSION}"
|
|
|
|
SHA512 285bb81418de6c5ad0207e579c9cc3f3d81759008fd9c1c2b62b77e2b4258ca7a3a6ec69d6bed65e1d6408636c3c5473b9ee4f9d18fe5f63da23803ca949c903
|
2021-01-17 11:33:51 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2021-10-12 02:02:24 +08:00
|
|
|
vcpkg_check_features(
|
|
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
FEATURES
|
|
|
|
openmp MSDFGEN_USE_OPENMP
|
2023-01-21 14:15:55 +08:00
|
|
|
geometry-preprocessing MSDFGEN_USE_SKIA
|
|
|
|
tools MSDFGEN_BUILD_STANDALONE
|
|
|
|
INVERTED_FEATURES
|
|
|
|
extensions MSDFGEN_CORE_ONLY
|
2021-10-12 02:02:24 +08:00
|
|
|
)
|
2021-01-17 11:33:51 +08:00
|
|
|
|
2023-01-21 14:15:55 +08:00
|
|
|
if (VCPKG_CRT_LINKAGE STREQUAL dynamic)
|
|
|
|
set(MSDFGEN_DYNAMIC_RUNTIME ON)
|
|
|
|
else()
|
|
|
|
set(MSDFGEN_DYNAMIC_RUNTIME OFF)
|
|
|
|
endif()
|
|
|
|
|
2021-10-12 02:02:24 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2021-01-17 11:33:51 +08:00
|
|
|
OPTIONS
|
2023-01-21 14:15:55 +08:00
|
|
|
-DMSDFGEN_USE_VCPKG=ON
|
|
|
|
-DMSDFGEN_VCPKG_FEATURES_SET=ON
|
|
|
|
-DMSDFGEN_INSTALL=ON
|
|
|
|
-DMSDFGEN_DYNAMIC_RUNTIME="${MSDFGEN_DYNAMIC_RUNTIME}"
|
2021-10-12 02:02:24 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2023-01-21 14:15:55 +08:00
|
|
|
MAYBE_UNUSED_VARIABLES
|
|
|
|
MSDFGEN_VCPKG_FEATURES_SET
|
2021-01-17 11:33:51 +08:00
|
|
|
)
|
|
|
|
|
2021-10-12 02:02:24 +08:00
|
|
|
vcpkg_cmake_install()
|
2021-01-17 11:33:51 +08:00
|
|
|
|
2021-10-12 02:02:24 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/msdfgen)
|
2021-01-17 11:33:51 +08:00
|
|
|
|
|
|
|
# move exe to tools
|
2023-01-21 14:15:55 +08:00
|
|
|
if("tools" IN_LIST FEATURES)
|
2021-01-17 11:33:51 +08:00
|
|
|
vcpkg_copy_tools(TOOL_NAMES msdfgen AUTO_CLEAN)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# cleanup
|
2021-10-12 02:02:24 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2021-01-17 11:33:51 +08:00
|
|
|
|
|
|
|
# license
|
2024-06-19 02:58:53 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.txt")
|