2024-10-25 13:25:44 +08:00
|
|
|
set(EXTRA_PATCHES "")
|
2022-08-02 05:21:17 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
2024-10-25 13:25:44 +08:00
|
|
|
list(APPEND EXTRA_PATCHES fix_clang-cl_build.patch)
|
2022-08-02 05:21:17 +08:00
|
|
|
endif()
|
|
|
|
|
2021-05-07 04:51:00 +08:00
|
|
|
vcpkg_from_gitlab(
|
2018-09-12 04:11:51 +08:00
|
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
2023-02-28 03:51:45 +08:00
|
|
|
GITLAB_URL https://gitlab.freedesktop.org
|
2021-05-07 04:51:00 +08:00
|
|
|
REPO cairo/cairo
|
2023-07-01 08:36:41 +08:00
|
|
|
REF "${VERSION}"
|
2024-10-25 13:25:44 +08:00
|
|
|
SHA512 5731eaa48857561aad023214ebb7be70344579a4bc75d00c46f8c622b4d34be7f79ab02e2cd54a419086490a3bf31aafa2418d873833b475b9824e3f2f5b17b6
|
2022-04-07 22:45:25 +08:00
|
|
|
PATCHES
|
2024-04-24 20:05:39 +08:00
|
|
|
cairo_add_lzo_feature_option.patch
|
2024-10-25 13:25:44 +08:00
|
|
|
msvc-convenience.diff
|
|
|
|
${EXTRA_PATCHES}
|
2017-06-14 14:05:50 +08:00
|
|
|
)
|
|
|
|
|
2021-04-20 06:30:03 +08:00
|
|
|
if("fontconfig" IN_LIST FEATURES)
|
2021-05-07 04:51:00 +08:00
|
|
|
list(APPEND OPTIONS -Dfontconfig=enabled)
|
2021-04-27 01:28:21 +08:00
|
|
|
else()
|
2021-05-07 04:51:00 +08:00
|
|
|
list(APPEND OPTIONS -Dfontconfig=disabled)
|
2021-02-04 04:56:00 +08:00
|
|
|
endif()
|
2021-04-20 06:30:03 +08:00
|
|
|
|
2021-04-27 01:28:21 +08:00
|
|
|
if("freetype" IN_LIST FEATURES)
|
2021-05-07 04:51:00 +08:00
|
|
|
list(APPEND OPTIONS -Dfreetype=enabled)
|
2021-04-27 01:28:21 +08:00
|
|
|
else()
|
2021-05-07 04:51:00 +08:00
|
|
|
list(APPEND OPTIONS -Dfreetype=disabled)
|
2021-04-20 06:30:03 +08:00
|
|
|
endif()
|
|
|
|
|
2019-09-20 06:18:04 +08:00
|
|
|
if ("x11" IN_LIST FEATURES)
|
2022-05-05 09:35:37 +08:00
|
|
|
message(WARNING "You will need to install Xorg dependencies to use feature x11:\nsudo apt install libx11-dev libxft-dev libxext-dev\n")
|
2021-05-07 04:51:00 +08:00
|
|
|
list(APPEND OPTIONS -Dxlib=enabled)
|
2021-04-27 01:28:21 +08:00
|
|
|
else()
|
2021-05-07 04:51:00 +08:00
|
|
|
list(APPEND OPTIONS -Dxlib=disabled)
|
2019-09-20 06:18:04 +08:00
|
|
|
endif()
|
2021-05-07 04:51:00 +08:00
|
|
|
list(APPEND OPTIONS -Dxcb=disabled)
|
2022-04-02 05:39:10 +08:00
|
|
|
list(APPEND OPTIONS -Dxlib-xcb=disabled)
|
2019-09-20 06:18:04 +08:00
|
|
|
|
2020-06-24 05:28:19 +08:00
|
|
|
if("gobject" IN_LIST FEATURES)
|
2021-05-07 04:51:00 +08:00
|
|
|
list(APPEND OPTIONS -Dglib=enabled)
|
2021-04-27 01:28:21 +08:00
|
|
|
else()
|
2021-05-07 04:51:00 +08:00
|
|
|
list(APPEND OPTIONS -Dglib=disabled)
|
2020-06-24 05:28:19 +08:00
|
|
|
endif()
|
|
|
|
|
2024-04-24 20:05:39 +08:00
|
|
|
if("lzo" IN_LIST FEATURES)
|
|
|
|
list(APPEND OPTIONS -Dlzo=enabled)
|
|
|
|
else()
|
|
|
|
list(APPEND OPTIONS -Dlzo=disabled)
|
|
|
|
endif()
|
|
|
|
|
2021-04-27 01:28:21 +08:00
|
|
|
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
|
|
|
set(ENV{CPP} "cl_cpp_wrapper")
|
|
|
|
endif()
|
2019-09-20 06:18:04 +08:00
|
|
|
|
2021-05-07 04:51:00 +08:00
|
|
|
vcpkg_configure_meson(
|
2022-04-07 22:45:25 +08:00
|
|
|
SOURCE_PATH "${SOURCE_PATH}"
|
2023-07-01 08:36:41 +08:00
|
|
|
OPTIONS
|
|
|
|
${OPTIONS}
|
2021-05-14 04:13:16 +08:00
|
|
|
-Dtests=disabled
|
|
|
|
-Dzlib=enabled
|
|
|
|
-Dpng=enabled
|
|
|
|
-Dspectre=auto
|
|
|
|
-Dgtk2-utils=disabled
|
2022-04-02 05:39:10 +08:00
|
|
|
-Dsymbol-lookup=disabled
|
2017-07-13 23:21:30 +08:00
|
|
|
)
|
2021-05-07 04:51:00 +08:00
|
|
|
vcpkg_install_meson()
|
2018-09-12 04:11:51 +08:00
|
|
|
|
2020-06-11 17:27:30 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
2017-06-01 14:32:41 +08:00
|
|
|
|
2021-04-27 01:28:21 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
2024-10-25 13:25:44 +08:00
|
|
|
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/cairo/cairo.h" "defined(CAIRO_WIN32_STATIC_BUILD)" "1")
|
2021-04-27 01:28:21 +08:00
|
|
|
endif()
|
|
|
|
|
2016-11-26 07:48:19 +08:00
|
|
|
vcpkg_copy_pdbs()
|
2021-05-07 04:51:00 +08:00
|
|
|
vcpkg_fixup_pkgconfig()
|
2021-04-27 01:28:21 +08:00
|
|
|
|
2024-10-25 13:25:44 +08:00
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static" OR NOT VCPKG_TARGET_IS_WINDOWS)
|
2021-05-07 04:51:00 +08:00
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
2021-05-14 04:13:16 +08:00
|
|
|
endif()
|
2022-04-07 22:45:25 +08:00
|
|
|
|
2023-07-11 08:16:20 +08:00
|
|
|
vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING" "${SOURCE_PATH}/COPYING-LGPL-2.1" "${SOURCE_PATH}/COPYING-MPL-1.1")
|