mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-25 14:59:05 +08:00
b47a6fa051
* Fix blend2d build with vs2017 * Update blend2d port with new version
60 lines
1.8 KiB
CMake
60 lines
1.8 KiB
CMake
vcpkg_from_github(
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO blend2d/blend2d
|
|
REF 0ca46df1d8ec7d8bc5250329ce281d82cfc96b99
|
|
SHA512 fbe54a59b0dc9fd0397619e3f6b1d336d3f906322a06583fe4f90bbb8bd95188f39f162b8ee66cc464050f6f40e856b72a80f37ac190a4a584fda71e2ce73689
|
|
HEAD_REF master
|
|
)
|
|
|
|
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BLEND2D_STATIC)
|
|
|
|
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
|
|
INVERTED_FEATURES
|
|
futex BLEND2D_NO_FUTEX
|
|
jit BLEND2D_NO_JIT
|
|
logging BLEND2D_NO_JIT_LOGGING
|
|
tls BLEND2D_NO_TLS
|
|
)
|
|
|
|
if(NOT BLEND2D_NO_JIT)
|
|
vcpkg_from_github(
|
|
OUT_SOURCE_PATH ASMJIT_SOURCE_PATH
|
|
REPO asmjit/asmjit
|
|
REF a4e1e88374142f4a842892f9c4bd0b0776fdcd0a
|
|
SHA512 c8588e2185502c9d045a63ebf722d1cf14eb7373423ef36f0e410525837430f117ad6c841aac16af17246c4d348c3e9094a848b917985de3f677098c1e32606f
|
|
HEAD_REF master
|
|
)
|
|
|
|
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_cmake_configure(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
OPTIONS
|
|
-DBLEND2D_STATIC=${BLEND2D_STATIC}
|
|
${FEATURE_OPTIONS}
|
|
)
|
|
|
|
vcpkg_cmake_install()
|
|
vcpkg_copy_pdbs()
|
|
|
|
vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/${PORT})
|
|
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
|
|
|
if(BLEND2D_STATIC)
|
|
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin)
|
|
endif()
|
|
|
|
# Handle copyright
|
|
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()
|