2020-06-06 02:59:33 +08:00
|
|
|
vcpkg_fail_port_install(ON_ARCH "arm" ON_ARCH "wasm32" ON_TARGET "uwp")
|
2019-05-20 08:17:40 +08:00
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO blend2d/blend2d
|
2020-08-06 05:05:58 +08:00
|
|
|
REF ee5c52aa5fcaaf9910dd2ef566a741d998bdfb98
|
|
|
|
SHA512 e33e9418be13d239feb2a88d52538e0a86b920b9bcb0473ac21b27fbd54f7c683e23c1f8a6dbcbcf24fdc85bfc1b5884ebea4a9a5e4ec1fcfbfaa006807e3d59
|
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
|
|
|
|
jit BLEND2D_NO_JIT
|
|
|
|
logging BLEND2D_NO_JIT_LOGGING
|
|
|
|
tls BLEND2D_NO_TLS
|
|
|
|
)
|
2019-05-20 08:17:40 +08:00
|
|
|
|
|
|
|
if(NOT BLEND2D_BUILD_NO_JIT)
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH ASMJIT_SOURCE_PATH
|
|
|
|
REPO asmjit/asmjit
|
2020-08-06 05:05:58 +08:00
|
|
|
REF 8474400e82c3ea65bd828761539e5d9b25f6bd83
|
|
|
|
SHA512 435be4ed22abbbbcdea3869b31bc2fc27aae969775773c24155d7490bca9591f51613fa3319cce54200c6d18dbe73a6be2d5449c49afb46934d93760501e98f6
|
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()
|
|
|
|
|
|
|
|
vcpkg_configure_cmake(
|
|
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
|
|
PREFER_NINJA
|
|
|
|
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
|
|
|
)
|
|
|
|
|
|
|
|
vcpkg_install_cmake()
|
|
|
|
vcpkg_copy_pdbs()
|
|
|
|
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
|
|
|
|
|
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()
|