2021-01-17 11:33:51 +08:00
|
|
|
# No symbols are exported in msdfgen source
|
|
|
|
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
|
|
|
|
|
2021-10-12 02:02:24 +08:00
|
|
|
if ("tools" IN_LIST FEATURES AND VCPKG_TARGET_IS_UWP)
|
|
|
|
message(FATAL_ERROR "Tools cannot be built on UWP.")
|
|
|
|
endif()
|
|
|
|
|
2021-01-17 11:33:51 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO Chlumsky/msdfgen
|
2022-05-10 05:35:05 +08:00
|
|
|
REF v1.9.2
|
|
|
|
SHA512 5080a640c353fde86883946a04581a072b39d0d2111b5f3217344510d78324cea69df4e5046a380e84cf7da247d96efd4407c041991fae69e128ba435774e30f
|
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
|
2022-05-10 05:35:05 +08:00
|
|
|
tools MSDFGEN_BUILD_STANDALONE
|
2021-10-12 02:02:24 +08:00
|
|
|
openmp MSDFGEN_USE_OPENMP
|
|
|
|
)
|
2021-01-17 11:33:51 +08:00
|
|
|
|
2021-10-12 02:02:24 +08:00
|
|
|
vcpkg_cmake_configure(
|
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2021-01-17 11:33:51 +08:00
|
|
|
OPTIONS
|
2021-10-12 02:02:24 +08:00
|
|
|
${FEATURE_OPTIONS}
|
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
|
2021-10-12 02:02:24 +08:00
|
|
|
if("tools" IN_LIST FEATURES AND VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
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
|
2021-10-12 02:02:24 +08:00
|
|
|
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|