mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 21:29:08 +08:00
52 lines
1.4 KiB
CMake
52 lines
1.4 KiB
CMake
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO Chlumsky/msdfgen
|
|
REF v1.11
|
|
SHA512 b5223bbdbd7245e7a891914158a25ea1d570bbe1066ca6c016d1ddd469d5156690f83f91c78630b2b2efcc890de0b7e1c9e8963a67f9eb8f83c6d45284d5b08a
|
|
HEAD_REF master
|
|
)
|
|
|
|
vcpkg_check_features(
|
|
OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
FEATURES
|
|
openmp MSDFGEN_USE_OPENMP
|
|
geometry-preprocessing MSDFGEN_USE_SKIA
|
|
tools MSDFGEN_BUILD_STANDALONE
|
|
INVERTED_FEATURES
|
|
extensions MSDFGEN_CORE_ONLY
|
|
)
|
|
|
|
if (VCPKG_CRT_LINKAGE STREQUAL dynamic)
|
|
set(MSDFGEN_DYNAMIC_RUNTIME ON)
|
|
else()
|
|
set(MSDFGEN_DYNAMIC_RUNTIME OFF)
|
|
endif()
|
|
|
|
vcpkg_cmake_configure(
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
|
OPTIONS
|
|
-DMSDFGEN_USE_VCPKG=ON
|
|
-DMSDFGEN_VCPKG_FEATURES_SET=ON
|
|
-DMSDFGEN_INSTALL=ON
|
|
-DMSDFGEN_DYNAMIC_RUNTIME="${MSDFGEN_DYNAMIC_RUNTIME}"
|
|
${FEATURE_OPTIONS}
|
|
MAYBE_UNUSED_VARIABLES
|
|
MSDFGEN_VCPKG_FEATURES_SET
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/msdfgen)
|
|
|
|
# move exe to tools
|
|
if("tools" IN_LIST FEATURES)
|
|
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)
|