2022-12-21 11:29:21 +08:00
|
|
|
include("${CMAKE_CURRENT_LIST_DIR}/skia-functions.cmake")
|
|
|
|
|
2023-11-02 02:45:44 +08:00
|
|
|
vcpkg_from_github(
|
2020-03-05 05:06:24 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2023-11-02 02:45:44 +08:00
|
|
|
REPO google/skia
|
2024-09-09 02:48:24 +08:00
|
|
|
REF "501e9efaa2fc929ec67c44da6dbaf9335264b559"
|
|
|
|
SHA512 978af9894d23d7b97d95d402bbf6c0c1401d63990361aae80166b620b0aa06d9dc2c75537850ff4c2df539735b4a12713cb29840613a15cbbff68590c48c4fac
|
2022-04-26 06:39:10 +08:00
|
|
|
PATCHES
|
2023-11-29 17:34:00 +08:00
|
|
|
disable-msvc-env-setup.patch
|
2024-09-09 02:48:24 +08:00
|
|
|
# disable-dev-test.patch
|
2024-02-22 14:42:39 +08:00
|
|
|
skia-include-string.patch
|
|
|
|
bentleyottmann-build.patch
|
|
|
|
graphite.patch
|
|
|
|
vulkan-headers.patch
|
2024-07-10 21:53:07 +08:00
|
|
|
pdfsubsetfont-uwp.diff
|
2020-03-05 05:06:24 +08:00
|
|
|
)
|
|
|
|
|
2024-02-22 14:42:39 +08:00
|
|
|
# De-vendor
|
|
|
|
file(REMOVE_RECURSE "${SOURCE_PATH}/include/third_party/vulkan")
|
|
|
|
|
2020-05-20 06:20:18 +08:00
|
|
|
# these following aren't available in vcpkg
|
2022-04-26 06:39:10 +08:00
|
|
|
# to update, visit the DEPS file in Skia's root directory
|
2022-12-21 11:29:21 +08:00
|
|
|
declare_external_from_git(abseil-cpp
|
2023-11-29 17:34:00 +08:00
|
|
|
URL "https://github.com/abseil/abseil-cpp.git"
|
2024-07-10 21:53:07 +08:00
|
|
|
REF "65a55c2ba891f6d2492477707f4a2e327a0b40dc"
|
2022-12-21 11:29:21 +08:00
|
|
|
LICENSE_FILE LICENSE
|
|
|
|
)
|
|
|
|
declare_external_from_git(d3d12allocator
|
2023-11-29 17:34:00 +08:00
|
|
|
URL "https://github.com/GPUOpen-LibrariesAndSDKs/D3D12MemoryAllocator.git"
|
2022-12-21 11:29:21 +08:00
|
|
|
REF "169895d529dfce00390a20e69c2f516066fe7a3b"
|
|
|
|
LICENSE_FILE LICENSE.txt
|
|
|
|
)
|
|
|
|
declare_external_from_git(dawn
|
|
|
|
URL "https://dawn.googlesource.com/dawn.git"
|
2024-09-09 02:48:24 +08:00
|
|
|
REF "db1fa936ad0a58846f179c81cdf60f55267099b9"
|
2022-12-21 11:29:21 +08:00
|
|
|
LICENSE_FILE LICENSE
|
|
|
|
)
|
|
|
|
declare_external_from_git(dng_sdk
|
|
|
|
URL "https://android.googlesource.com/platform/external/dng_sdk.git"
|
2024-10-10 23:10:43 +08:00
|
|
|
REF "679499cc9b92cfb0ae1dccbfd7e97ce719d23576"
|
2022-12-21 11:29:21 +08:00
|
|
|
LICENSE_FILE LICENSE
|
|
|
|
)
|
|
|
|
declare_external_from_git(jinja2
|
|
|
|
URL "https://chromium.googlesource.com/chromium/src/third_party/jinja2"
|
2024-02-22 14:42:39 +08:00
|
|
|
REF "e2d024354e11cc6b041b0cff032d73f0c7e43a07"
|
2022-12-21 11:29:21 +08:00
|
|
|
LICENSE_FILE LICENSE.rst
|
|
|
|
)
|
|
|
|
declare_external_from_git(markupsafe
|
|
|
|
URL "https://chromium.googlesource.com/chromium/src/third_party/markupsafe"
|
2024-02-22 14:42:39 +08:00
|
|
|
REF "0bad08bb207bbfc1d6f3bbc82b9242b0c50e5794"
|
2022-12-21 11:29:21 +08:00
|
|
|
LICENSE_FILE LICENSE
|
|
|
|
)
|
|
|
|
declare_external_from_git(piex
|
|
|
|
URL "https://android.googlesource.com/platform/external/piex.git"
|
|
|
|
REF "bb217acdca1cc0c16b704669dd6f91a1b509c406"
|
|
|
|
LICENSE_FILE LICENSE
|
|
|
|
)
|
|
|
|
declare_external_from_git(spirv-cross
|
2023-11-29 17:34:00 +08:00
|
|
|
URL "https://github.com/KhronosGroup/SPIRV-Cross"
|
2024-03-16 09:37:57 +08:00
|
|
|
REF "b8fcf307f1f347089e3c46eb4451d27f32ebc8d3"
|
2022-12-21 11:29:21 +08:00
|
|
|
LICENSE_FILE LICENSE
|
|
|
|
)
|
|
|
|
declare_external_from_git(spirv-headers
|
2023-11-29 17:34:00 +08:00
|
|
|
URL "https://github.com/KhronosGroup/SPIRV-Headers.git"
|
2024-09-09 02:48:24 +08:00
|
|
|
REF "1b75a4ae0b4289014b4c369301dc925c366f78a6"
|
2022-12-21 11:29:21 +08:00
|
|
|
LICENSE_FILE LICENSE
|
2020-05-20 06:20:18 +08:00
|
|
|
)
|
2022-12-21 11:29:21 +08:00
|
|
|
declare_external_from_git(spirv-tools
|
2023-11-29 17:34:00 +08:00
|
|
|
URL "https://github.com/KhronosGroup/SPIRV-Tools.git"
|
2024-09-09 02:48:24 +08:00
|
|
|
REF "87fcbaf1bc8346469e178711eff27cfd20aa1960"
|
2022-12-21 11:29:21 +08:00
|
|
|
LICENSE_FILE LICENSE
|
2020-05-20 06:20:18 +08:00
|
|
|
)
|
2023-11-02 02:45:44 +08:00
|
|
|
declare_external_from_git(wuffs
|
2023-11-29 17:34:00 +08:00
|
|
|
URL "https://github.com/google/wuffs-mirror-release-c.git"
|
2024-02-22 14:42:39 +08:00
|
|
|
REF "e3f919ccfe3ef542cfc983a82146070258fb57f8"
|
2023-11-02 02:45:44 +08:00
|
|
|
LICENSE_FILE LICENSE
|
|
|
|
)
|
2020-05-20 06:20:18 +08:00
|
|
|
|
2022-12-21 11:29:21 +08:00
|
|
|
declare_external_from_pkgconfig(expat)
|
|
|
|
declare_external_from_pkgconfig(fontconfig PATH "third_party")
|
|
|
|
declare_external_from_pkgconfig(freetype2)
|
|
|
|
declare_external_from_pkgconfig(harfbuzz MODULES harfbuzz harfbuzz-subset)
|
2023-11-29 17:34:00 +08:00
|
|
|
declare_external_from_pkgconfig(icu MODULES icu-uc)
|
2022-12-21 11:29:21 +08:00
|
|
|
declare_external_from_pkgconfig(libjpeg PATH "third_party/libjpeg-turbo" MODULES libturbojpeg libjpeg)
|
|
|
|
declare_external_from_pkgconfig(libpng)
|
|
|
|
declare_external_from_pkgconfig(libwebp MODULES libwebpdecoder libwebpdemux libwebpmux libwebp)
|
|
|
|
declare_external_from_pkgconfig(zlib)
|
|
|
|
|
2023-07-27 10:52:57 +08:00
|
|
|
declare_external_from_vcpkg(vulkan_headers PATH third_party/externals/vulkan-headers)
|
|
|
|
|
2022-12-21 11:29:21 +08:00
|
|
|
set(known_cpus x86 x64 arm arm64 wasm)
|
|
|
|
if(NOT VCPKG_TARGET_ARCHITECTURE IN_LIST known_cpus)
|
|
|
|
message(WARNING "Unknown target cpu '${VCPKG_TARGET_ARCHITECTURE}'.")
|
|
|
|
endif()
|
|
|
|
|
2023-11-29 17:34:00 +08:00
|
|
|
string(JOIN " " OPTIONS
|
|
|
|
"target_cpu=\"${VCPKG_TARGET_ARCHITECTURE}\""
|
|
|
|
skia_enable_android_utils=false
|
|
|
|
skia_enable_spirv_validation=false
|
|
|
|
skia_enable_tools=false
|
|
|
|
skia_enable_gpu_debug_layers=false
|
|
|
|
skia_use_jpeg_gainmaps=false
|
|
|
|
skia_use_libheif=false
|
|
|
|
skia_use_lua=false
|
|
|
|
)
|
2022-12-21 11:29:21 +08:00
|
|
|
set(OPTIONS_DBG "is_debug=true")
|
|
|
|
set(OPTIONS_REL "is_official_build=true")
|
2023-11-29 17:34:00 +08:00
|
|
|
vcpkg_list(SET SKIA_TARGETS :skia :modules)
|
2022-12-21 11:29:21 +08:00
|
|
|
|
|
|
|
if(VCPKG_TARGET_IS_ANDROID)
|
|
|
|
string(APPEND OPTIONS " target_os=\"android\"")
|
|
|
|
elseif(VCPKG_TARGET_IS_IOS)
|
|
|
|
string(APPEND OPTIONS " target_os=\"ios\"")
|
|
|
|
elseif(VCPKG_TARGET_IS_EMSCRIPTEN)
|
|
|
|
string(APPEND OPTIONS " target_os=\"wasm\"")
|
2023-11-29 17:34:00 +08:00
|
|
|
elseif(VCPKG_TARGET_IS_WINDOWS)
|
2022-12-21 11:29:21 +08:00
|
|
|
string(APPEND OPTIONS " target_os=\"win\"")
|
|
|
|
if(VCPKG_TARGET_IS_UWP)
|
|
|
|
string(APPEND OPTIONS " skia_enable_winuwp=true skia_enable_fontmgr_win=false skia_use_xps=false")
|
2022-11-08 07:42:19 +08:00
|
|
|
endif()
|
2023-11-29 17:34:00 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
|
|
|
string(APPEND OPTIONS " skia_enable_skparagraph=false")
|
2024-02-22 14:42:39 +08:00
|
|
|
string(APPEND OPTIONS " skia_enable_bentleyottmann=false")
|
2023-11-29 17:34:00 +08:00
|
|
|
endif()
|
2022-12-21 11:29:21 +08:00
|
|
|
endif()
|
2022-11-08 07:42:19 +08:00
|
|
|
|
2022-12-21 11:29:21 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
2022-04-26 06:39:10 +08:00
|
|
|
string(APPEND OPTIONS " is_component_build=true")
|
2020-03-05 05:06:24 +08:00
|
|
|
else()
|
2022-04-26 06:39:10 +08:00
|
|
|
string(APPEND OPTIONS " is_component_build=false")
|
|
|
|
endif()
|
|
|
|
|
2022-12-21 11:29:21 +08:00
|
|
|
set(required_externals
|
|
|
|
dng_sdk
|
|
|
|
expat
|
|
|
|
libjpeg
|
|
|
|
libpng
|
|
|
|
libwebp
|
|
|
|
piex
|
|
|
|
zlib
|
2023-11-02 02:45:44 +08:00
|
|
|
wuffs
|
2022-12-21 11:29:21 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
if("fontconfig" IN_LIST FEATURES)
|
|
|
|
list(APPEND required_externals fontconfig)
|
|
|
|
string(APPEND OPTIONS " skia_use_fontconfig=true")
|
2023-11-29 17:34:00 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
|
|
|
string(APPEND OPTIONS " skia_enable_fontmgr_FontConfigInterface=false")
|
|
|
|
endif()
|
2022-12-21 11:29:21 +08:00
|
|
|
else()
|
|
|
|
string(APPEND OPTIONS " skia_use_fontconfig=false")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if("freetype" IN_LIST FEATURES)
|
|
|
|
list(APPEND required_externals freetype2)
|
|
|
|
string(APPEND OPTIONS " skia_use_freetype=true")
|
|
|
|
else()
|
|
|
|
string(APPEND OPTIONS " skia_use_freetype=false")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if("harfbuzz" IN_LIST FEATURES)
|
|
|
|
list(APPEND required_externals harfbuzz)
|
|
|
|
string(APPEND OPTIONS " skia_use_harfbuzz=true")
|
|
|
|
else()
|
|
|
|
string(APPEND OPTIONS " skia_use_harfbuzz=false")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if("icu" IN_LIST FEATURES)
|
|
|
|
list(APPEND required_externals icu)
|
2024-07-10 21:53:07 +08:00
|
|
|
string(APPEND OPTIONS " skia_use_icu=true skia_use_system_icu=true")
|
2022-12-21 11:29:21 +08:00
|
|
|
else()
|
|
|
|
string(APPEND OPTIONS " skia_use_icu=false")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if("gl" IN_LIST FEATURES)
|
|
|
|
string(APPEND OPTIONS " skia_use_gl=true")
|
|
|
|
else()
|
|
|
|
string(APPEND OPTIONS " skia_use_gl=false")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if("metal" IN_LIST FEATURES)
|
|
|
|
string(APPEND OPTIONS " skia_use_metal=true")
|
2020-03-05 05:06:24 +08:00
|
|
|
endif()
|
|
|
|
|
2022-04-26 06:39:10 +08:00
|
|
|
if("vulkan" IN_LIST FEATURES)
|
2023-07-27 10:52:57 +08:00
|
|
|
list(APPEND required_externals
|
|
|
|
vulkan_headers
|
|
|
|
)
|
2024-02-22 14:42:39 +08:00
|
|
|
string(APPEND OPTIONS " skia_use_vulkan=true skia_vulkan_memory_allocator_dir=\"${CURRENT_INSTALLED_DIR}\"")
|
2022-04-26 06:39:10 +08:00
|
|
|
endif()
|
|
|
|
|
2022-12-21 11:29:21 +08:00
|
|
|
if("direct3d" IN_LIST FEATURES)
|
|
|
|
list(APPEND required_externals
|
|
|
|
spirv-cross
|
|
|
|
spirv-headers
|
|
|
|
spirv-tools
|
|
|
|
d3d12allocator
|
|
|
|
)
|
|
|
|
string(APPEND OPTIONS " skia_use_direct3d=true")
|
|
|
|
endif()
|
2022-04-26 06:39:10 +08:00
|
|
|
|
2024-02-22 14:42:39 +08:00
|
|
|
if("graphite" IN_LIST FEATURES)
|
|
|
|
string(APPEND OPTIONS " skia_enable_graphite=true")
|
|
|
|
endif()
|
|
|
|
|
2022-12-21 11:29:21 +08:00
|
|
|
if("dawn" IN_LIST FEATURES)
|
2022-04-26 06:39:10 +08:00
|
|
|
if (VCPKG_TARGET_IS_LINUX)
|
|
|
|
message(WARNING
|
|
|
|
[[
|
|
|
|
dawn support requires the following libraries from the system package manager:
|
|
|
|
|
|
|
|
libx11-xcb-dev mesa-common-dev
|
|
|
|
|
|
|
|
They can be installed on Debian based systems via
|
|
|
|
|
|
|
|
apt-get install libx11-xcb-dev mesa-common-dev
|
|
|
|
]]
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2022-12-21 11:29:21 +08:00
|
|
|
list(APPEND required_externals
|
|
|
|
spirv-cross
|
|
|
|
spirv-headers
|
|
|
|
spirv-tools
|
|
|
|
jinja2
|
|
|
|
markupsafe
|
2023-07-27 10:52:57 +08:00
|
|
|
vulkan_headers
|
2022-04-26 06:39:10 +08:00
|
|
|
## Remove
|
2022-12-21 11:29:21 +08:00
|
|
|
abseil-cpp
|
2022-04-26 06:39:10 +08:00
|
|
|
## REMOVE ^
|
2022-12-21 11:29:21 +08:00
|
|
|
dawn
|
|
|
|
)
|
2024-02-22 14:42:39 +08:00
|
|
|
file(REMOVE_RECURSE "${SOURCE_PATH}/third_party/externals/opengl-registry")
|
|
|
|
file(INSTALL "${CURRENT_INSTALLED_DIR}/share/opengl/" DESTINATION "${SOURCE_PATH}/third_party/externals/opengl-registry/xml")
|
2023-11-29 17:34:00 +08:00
|
|
|
# cf. external dawn/src/dawn/native/BUILD.gn
|
2024-02-22 14:42:39 +08:00
|
|
|
string(APPEND OPTIONS " skia_use_dawn=true dawn_use_swiftshader=false")
|
2023-11-29 17:34:00 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
|
|
string(APPEND OPTIONS " dawn_complete_static_libs=true")
|
|
|
|
endif()
|
2022-04-26 06:39:10 +08:00
|
|
|
endif()
|
|
|
|
|
2022-12-21 11:29:21 +08:00
|
|
|
get_externals(${required_externals})
|
2023-11-29 17:34:00 +08:00
|
|
|
if(EXISTS "${SOURCE_PATH}/third_party/externals/dawn")
|
2022-12-21 11:29:21 +08:00
|
|
|
vcpkg_find_acquire_program(GIT)
|
|
|
|
vcpkg_replace_string("${SOURCE_PATH}/third_party/externals/dawn/generator/dawn_version_generator.py"
|
2024-02-22 14:42:39 +08:00
|
|
|
"get_git(),"
|
2022-12-21 11:29:21 +08:00
|
|
|
"\"${GIT}\","
|
|
|
|
)
|
2020-03-05 05:06:24 +08:00
|
|
|
endif()
|
2024-07-10 21:53:07 +08:00
|
|
|
if("icu" IN_LIST FEATURES)
|
|
|
|
vcpkg_replace_string("${SOURCE_PATH}/third_party/icu/BUILD.gn"
|
|
|
|
[[config("vcpkg_icu") {]]
|
|
|
|
[[import("icu.gni")
|
|
|
|
config("vcpkg_icu") {]])
|
|
|
|
endif()
|
2020-03-05 05:06:24 +08:00
|
|
|
|
2022-12-21 11:29:21 +08:00
|
|
|
vcpkg_find_acquire_program(PYTHON3)
|
2023-01-19 05:38:56 +08:00
|
|
|
vcpkg_replace_string("${SOURCE_PATH}/.gn" "script_executable = \"python3\"" "script_executable = \"${PYTHON3}\"")
|
|
|
|
vcpkg_replace_string("${SOURCE_PATH}/gn/toolchain/BUILD.gn" "python3 " "\\\"${PYTHON3}\\\" ")
|
2020-03-05 05:06:24 +08:00
|
|
|
|
2022-12-21 11:29:21 +08:00
|
|
|
vcpkg_cmake_get_vars(cmake_vars_file)
|
|
|
|
include("${cmake_vars_file}")
|
2023-11-29 17:34:00 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS)
|
2022-12-21 11:29:21 +08:00
|
|
|
string(REGEX REPLACE "[\\]\$" "" WIN_VC "$ENV{VCINSTALLDIR}")
|
2024-10-16 11:55:40 +08:00
|
|
|
string(REGEX REPLACE "[\\]\$" "" WIN_SDK "$ENV{WindowsSdkDir}")
|
2022-12-21 11:29:21 +08:00
|
|
|
string(APPEND OPTIONS " win_vc=\"${WIN_VC}\"")
|
2024-10-16 11:55:40 +08:00
|
|
|
string(APPEND OPTIONS " win_sdk=\"${WIN_SDK}\"")
|
2023-11-29 17:34:00 +08:00
|
|
|
elseif(VCPKG_TARGET_IS_ANDROID)
|
|
|
|
string(APPEND OPTIONS " ndk=\"${VCPKG_DETECTED_CMAKE_ANDROID_NDK}\" ndk_api=${VCPKG_DETECTED_CMAKE_SYSTEM_VERSION}")
|
2022-12-21 11:29:21 +08:00
|
|
|
else()
|
2023-01-24 08:03:29 +08:00
|
|
|
string(APPEND OPTIONS " \
|
2022-12-21 11:29:21 +08:00
|
|
|
cc=\"${VCPKG_DETECTED_CMAKE_C_COMPILER}\" \
|
|
|
|
cxx=\"${VCPKG_DETECTED_CMAKE_CXX_COMPILER}\"")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
string_to_gn_list(SKIA_C_FLAGS_DBG "${VCPKG_COMBINED_C_FLAGS_DEBUG}")
|
|
|
|
string_to_gn_list(SKIA_CXX_FLAGS_DBG "${VCPKG_COMBINED_CXX_FLAGS_DEBUG}")
|
|
|
|
string(APPEND OPTIONS_DBG " \
|
|
|
|
extra_cflags_c=${SKIA_C_FLAGS_DBG} \
|
|
|
|
extra_cflags_cc=${SKIA_CXX_FLAGS_DBG}")
|
|
|
|
string_to_gn_list(SKIA_C_FLAGS_REL "${VCPKG_COMBINED_C_FLAGS_RELEASE}")
|
|
|
|
string_to_gn_list(SKIA_CXX_FLAGS_REL "${VCPKG_COMBINED_CXX_FLAGS_RELEASE}")
|
|
|
|
string(APPEND OPTIONS_REL " \
|
|
|
|
extra_cflags_c=${SKIA_C_FLAGS_REL} \
|
|
|
|
extra_cflags_cc=${SKIA_CXX_FLAGS_REL}")
|
|
|
|
if(VCPKG_TARGET_IS_UWP)
|
|
|
|
string_to_gn_list(SKIA_LD_FLAGS "-APPCONTAINER WindowsApp.lib")
|
|
|
|
string(APPEND OPTIONS " extra_ldflags=${SKIA_LD_FLAGS}")
|
2020-03-05 05:06:24 +08:00
|
|
|
endif()
|
|
|
|
|
2023-01-27 10:53:54 +08:00
|
|
|
vcpkg_gn_configure(
|
2020-05-20 06:20:18 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2023-11-29 17:34:00 +08:00
|
|
|
OPTIONS "${OPTIONS}"
|
2020-05-20 06:20:18 +08:00
|
|
|
OPTIONS_DEBUG "${OPTIONS_DBG}"
|
|
|
|
OPTIONS_RELEASE "${OPTIONS_REL}"
|
2020-03-05 05:06:24 +08:00
|
|
|
)
|
|
|
|
|
2023-11-29 17:34:00 +08:00
|
|
|
skia_gn_install(
|
2020-05-20 06:20:18 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2022-12-21 11:29:21 +08:00
|
|
|
TARGETS ${SKIA_TARGETS}
|
2020-03-05 05:06:24 +08:00
|
|
|
)
|
|
|
|
|
2022-12-21 11:29:21 +08:00
|
|
|
# Use skia repository layout in ${CURRENT_PACKAGES_DIR}/include/skia
|
2022-01-26 02:31:15 +08:00
|
|
|
file(COPY "${SOURCE_PATH}/include"
|
2022-12-21 11:29:21 +08:00
|
|
|
"${SOURCE_PATH}/modules"
|
|
|
|
"${SOURCE_PATH}/src"
|
|
|
|
DESTINATION "${CURRENT_PACKAGES_DIR}/include/skia"
|
|
|
|
FILES_MATCHING PATTERN "*.h"
|
|
|
|
)
|
|
|
|
auto_clean("${CURRENT_PACKAGES_DIR}/include/skia")
|
|
|
|
set(skia_dll_static "0")
|
|
|
|
set(skia_dll_dynamic "1")
|
2024-07-08 22:34:12 +08:00
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/skia/include/private/base/SkAPI.h" "defined(SKIA_DLL)" "${skia_dll_${VCPKG_LIBRARY_LINKAGE}}")
|
2022-12-21 11:29:21 +08:00
|
|
|
|
|
|
|
# vcpkg legacy layout omits "include/" component. Just duplicate.
|
|
|
|
file(COPY "${CURRENT_PACKAGES_DIR}/include/skia/include/" DESTINATION "${CURRENT_PACKAGES_DIR}/include/skia")
|
|
|
|
|
|
|
|
# vcpkg legacy
|
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/skiaConfig.cmake" DESTINATION "${CURRENT_PACKAGES_DIR}/share/skia")
|
|
|
|
|
|
|
|
file(INSTALL
|
|
|
|
"${CMAKE_CURRENT_LIST_DIR}/example/CMakeLists.txt"
|
|
|
|
"${SOURCE_PATH}/tools/convert-to-nia.cpp"
|
|
|
|
DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}/example"
|
|
|
|
)
|
|
|
|
file(APPEND "${CURRENT_PACKAGES_DIR}/share/${PORT}/example/convert-to-nia.cpp" [[
|
|
|
|
// Test for https://github.com/microsoft/vcpkg/issues/27219
|
|
|
|
#include "include/core/SkColorSpace.h"
|
|
|
|
]])
|
2020-03-05 05:06:24 +08:00
|
|
|
|
2022-12-21 11:29:21 +08:00
|
|
|
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}")
|
2020-03-05 05:06:24 +08:00
|
|
|
|
2022-12-21 11:29:21 +08:00
|
|
|
file(GLOB third_party_licenses "${SOURCE_PATH}/third_party_licenses/*")
|
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE" ${third_party_licenses})
|