pineapple/externals/vcpkg/ports/msdfgen/portfile.cmake

43 lines
1.2 KiB
CMake
Raw Normal View History

2022-07-23 03:01:36 +02:00
# No symbols are exported in msdfgen source
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
if ("tools" IN_LIST FEATURES AND VCPKG_TARGET_IS_UWP)
message(FATAL_ERROR "Tools cannot be built on UWP.")
endif()
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO Chlumsky/msdfgen
REF v1.9.2
SHA512 5080a640c353fde86883946a04581a072b39d0d2111b5f3217344510d78324cea69df4e5046a380e84cf7da247d96efd4407c041991fae69e128ba435774e30f
HEAD_REF master
)
vcpkg_check_features(
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
tools MSDFGEN_BUILD_STANDALONE
openmp MSDFGEN_USE_OPENMP
)
vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
OPTIONS
${FEATURE_OPTIONS}
)
vcpkg_cmake_install()
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/msdfgen)
# move exe to tools
if("tools" IN_LIST FEATURES AND VCPKG_LIBRARY_LINKAGE STREQUAL "static")
vcpkg_copy_tools(TOOL_NAMES msdfgen AUTO_CLEAN)
endif()
# cleanup
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
# license
file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)