diff options
| author | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
|---|---|---|
| committer | Ethan Morgan <ethan@gweithio.com> | 2026-02-14 16:44:06 +0000 |
| commit | 54409423f767d8b1cf30cb7d0efca6b4ca138823 (patch) | |
| tree | d915ac7828703ce4b963efdd9728a1777ba18c1e /vcpkg/ports/blend2d | |
Diffstat (limited to 'vcpkg/ports/blend2d')
| -rw-r--r-- | vcpkg/ports/blend2d/portfile.cmake | 45 | ||||
| -rw-r--r-- | vcpkg/ports/blend2d/usage | 4 | ||||
| -rw-r--r-- | vcpkg/ports/blend2d/vcpkg.json | 35 |
3 files changed, 84 insertions, 0 deletions
diff --git a/vcpkg/ports/blend2d/portfile.cmake b/vcpkg/ports/blend2d/portfile.cmake new file mode 100644 index 0000000..4dcfcdd --- /dev/null +++ b/vcpkg/ports/blend2d/portfile.cmake @@ -0,0 +1,45 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO blend2d/blend2d + REF d2027ebfd6aaf53b190b6b3b497425fc85f14251 # commited on 2025-03-08 + SHA512 f7ecda8280290a1692bbec618522eccf1d74f79c688affc687848459c06762e405ad2f319845a548d478723ed8bf8db609e4691bc335f364baceb20d9d3aa597 + HEAD_REF master +) + +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" BLEND2D_STATIC) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + jit BLEND2D_EXTERNAL_ASMJIT + INVERTED_FEATURES + jit BLEND2D_NO_JIT +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + "-DBLEND2D_STATIC=${BLEND2D_STATIC}" + "-DBLEND2D_NO_FUTEX=OFF" + ${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(VCPKG_LIBRARY_LINKAGE STREQUAL "static") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/blend2d/api.h" + "#if !defined(BL_STATIC)" + "#if 0" + ) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/blend2d-debug.h" + "#if defined(BL_STATIC)" + "#if 1" + ) +endif() + +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE.md") diff --git a/vcpkg/ports/blend2d/usage b/vcpkg/ports/blend2d/usage new file mode 100644 index 0000000..e5adf17 --- /dev/null +++ b/vcpkg/ports/blend2d/usage @@ -0,0 +1,4 @@ +blend2d provides CMake targets: + + find_package(blend2d CONFIG REQUIRED) + target_link_libraries(main PRIVATE blend2d::blend2d) diff --git a/vcpkg/ports/blend2d/vcpkg.json b/vcpkg/ports/blend2d/vcpkg.json new file mode 100644 index 0000000..4ab7b25 --- /dev/null +++ b/vcpkg/ports/blend2d/vcpkg.json @@ -0,0 +1,35 @@ +{ + "name": "blend2d", + "version-date": "2025-03-08", + "port-version": 1, + "description": "2D Vector Graphics Engine Powered by a JIT Compiler", + "homepage": "https://github.com/blend2d/blend2d", + "documentation": "https://blend2d.com/doc/index.html", + "license": "Zlib", + "supports": "!wasm32", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "default-features": [ + { + "name": "jit", + "platform": "!arm32" + } + ], + "features": { + "jit": { + "description": "Enables JIT compiler to generate optimized pipelines.", + "supports": "!arm32", + "dependencies": [ + "asmjit" + ] + } + } +} |