2019-05-20 08:17:40 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO blend2d/blend2d
|
2023-01-17 04:52:43 +08:00
|
|
|
REF 7b420376ed32f3979f860d8c3be04128ab5c6690
|
|
|
|
SHA512 88818bfe18b0638b02f84277a4584ddf2cee2158540c1794c3a96c12891274472dc896bef94408baf9ec398e30549c0b3feda58e4b7bf3014a0cf436f394a3ed
|
2019-05-20 08:17:40 +08:00
|
|
|
HEAD_REF master
|
|
|
|
)
|
|
|
|
|
2019-07-19 04:32:41 +08:00
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BLEND2D_STATIC)
|
2019-05-20 08:17:40 +08:00
|
|
|
|
2020-05-08 13:30:20 +08:00
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
|
|
INVERTED_FEATURES
|
2022-04-06 02:19:17 +08:00
|
|
|
futex BLEND2D_NO_FUTEX
|
2020-05-08 13:30:20 +08:00
|
|
|
jit BLEND2D_NO_JIT
|
|
|
|
logging BLEND2D_NO_JIT_LOGGING
|
|
|
|
tls BLEND2D_NO_TLS
|
|
|
|
)
|
2019-05-20 08:17:40 +08:00
|
|
|
|
2021-03-24 05:30:38 +08:00
|
|
|
if(NOT BLEND2D_NO_JIT)
|
2019-05-20 08:17:40 +08:00
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH ASMJIT_SOURCE_PATH
|
|
|
|
REPO asmjit/asmjit
|
2023-01-17 04:52:43 +08:00
|
|
|
REF a9ac13536e08041296010645551b2cdcd615d512
|
|
|
|
SHA512 64e7649208889f0c96890d3904c2f8e716a72b1edf2dfd07af0114565e03681e503c062af8b4fea4ed70122bd7eab2f966038f7b29058f60f6f3f609508422b6
|
2019-07-19 04:32:41 +08:00
|
|
|
HEAD_REF master
|
2019-05-20 08:17:40 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${SOURCE_PATH}/3rdparty/asmjit)
|
|
|
|
|
|
|
|
get_filename_component(ASMJIT_SOURCE_DIR_NAME ${ASMJIT_SOURCE_PATH} NAME)
|
|
|
|
file(COPY ${ASMJIT_SOURCE_PATH} DESTINATION ${SOURCE_PATH}/3rdparty)
|
|
|
|
file(RENAME ${SOURCE_PATH}/3rdparty/${ASMJIT_SOURCE_DIR_NAME} ${SOURCE_PATH}/3rdparty/asmjit)
|
|
|
|
endif()
|
|
|
|
|
2022-04-06 02:19:17 +08:00
|
|
|
vcpkg_cmake_configure(
|
2019-05-20 08:17:40 +08:00
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
OPTIONS
|
2019-07-19 04:32:41 +08:00
|
|
|
-DBLEND2D_STATIC=${BLEND2D_STATIC}
|
2020-05-08 13:30:20 +08:00
|
|
|
${FEATURE_OPTIONS}
|
2019-05-20 08:17:40 +08:00
|
|
|
)
|
|
|
|
|
2022-04-06 02:19:17 +08:00
|
|
|
vcpkg_cmake_install()
|
2019-05-20 08:17:40 +08:00
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
2022-04-06 02:19:17 +08:00
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
|
2019-05-20 08:17:40 +08:00
|
|
|
|
2021-01-20 03:48:50 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
2019-05-20 08:17:40 +08:00
|
|
|
|
2019-07-19 04:32:41 +08:00
|
|
|
if(BLEND2D_STATIC)
|
2019-05-20 08:17:40 +08:00
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# Handle copyright
|
2019-07-19 04:32:41 +08:00
|
|
|
configure_file(${SOURCE_PATH}/LICENSE.md ${CURRENT_PACKAGES_DIR}/share/${PORT}/copyright COPYONLY)
|
|
|
|
|
|
|
|
if(BLEND2D_STATIC)
|
|
|
|
# Install usage
|
|
|
|
configure_file(${CMAKE_CURRENT_LIST_DIR}/usage ${CURRENT_PACKAGES_DIR}/share/${PORT}/usage @ONLY)
|
|
|
|
endif()
|