2020-04-07 05:09:03 +08:00
|
|
|
vcpkg_fail_port_install(ON_ARCH "arm" ON_TARGET "uwp")
|
2019-05-20 08:17:40 +08:00
|
|
|
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
|
|
REPO blend2d/blend2d
|
2020-04-22 04:22:14 +08:00
|
|
|
REF b9eb3657be24a1ed5aded86ee065352c1703c9e0
|
|
|
|
SHA512 e5c0b447b3ae773d759149e9c43038fd05e8444a5b8013d81b444e825662eaa55c10105c3cd849495e243e62e1b2e53386055daacb36a271f594c462778ea255
|
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
|
|
|
|
|
|
|
if(NOT ("jit" IN_LIST FEATURES))
|
|
|
|
set(BLEND2D_BUILD_NO_JIT TRUE)
|
|
|
|
endif()
|
|
|
|
if(NOT ("logging" IN_LIST FEATURES))
|
|
|
|
set(BLEND2D_BUILD_NO_LOGGING TRUE)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(NOT BLEND2D_BUILD_NO_JIT)
|
|
|
|
vcpkg_from_github(
|
|
|
|
OUT_SOURCE_PATH ASMJIT_SOURCE_PATH
|
|
|
|
REPO asmjit/asmjit
|
2020-04-17 02:57:00 +08:00
|
|
|
REF d241dfb364ba8984f621331e889014507ecb5bfc
|
|
|
|
SHA512 345d9645f204b23e1fbedc4ab6a73790e07f8f91a953f8a89e053c3431a80c0a7430c7e2b2130d11d0029ee851f3bf1b046d7e1c9ba12396ffb9c9ee05403fc7
|
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}
|
2019-05-20 08:17:40 +08:00
|
|
|
-DBLEND2D_BUILD_NO_JIT=${BLEND2D_BUILD_NO_JIT}
|
|
|
|
-DBLEND2D_BUILD_NO_LOGGING=${BLEND2D_BUILD_NO_LOGGING}
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
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()
|