mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-02 22:35:31 +08:00
25eaff7533
* [cairo] upgrade cairo to 1.7.6 (microsoft#23848) * [cairo] remove patch (microsoft#23848) 0001-meson-fix-macOS-build-and-add-macOS-ci.patch has been merged into the upstream repository and is part of the 1.7.6 release. * [cairo] use meson option to disable bfd (microsoft#23848) Upstream has introduced an option to disable bfd. Use the option to disable it (See microsoft#23022) * [cairo] chase upstream cflags handling (microsoft#23848) Upstream has put all cflags handling into the top-level meson. Move our static compilation indicator definition to the top level, too. * [cairo] force-disable xcb (microsoft#23848) This is the next update * [cairo] format vcpkg.json (microsoft#23848) * [cairo] update version registries (microsoft#23848) * [cairo] add license (microsoft#23848) * [cairo] regenerate versions registry (microsoft#23848) Co-authored-by: Schaich <alonso.schaich@sodgeit.de>
89 lines
2.7 KiB
CMake
89 lines
2.7 KiB
CMake
set(CAIRO_VERSION 1.17.4)
|
|
|
|
vcpkg_from_gitlab(
|
|
GITLAB_URL https://gitlab.freedesktop.org
|
|
OUT_SOURCE_PATH SOURCE_PATH
|
|
REPO cairo/cairo
|
|
REF b43e7c6f3cf7855e16170a06d3a9c7234c60ca94 #v1.17.6
|
|
SHA512 2d8f0cbb11638610eda104a370bb8450e28d835852b0f861928738a60949e0aaba7a554a9f9efabbefda10a37616d4cd0d3021b3fbb4ced1d52db1edb49bc358
|
|
HEAD_REF master
|
|
PATCHES cairo_static_fix.patch
|
|
)
|
|
|
|
if("fontconfig" IN_LIST FEATURES)
|
|
list(APPEND OPTIONS -Dfontconfig=enabled)
|
|
else()
|
|
list(APPEND OPTIONS -Dfontconfig=disabled)
|
|
endif()
|
|
|
|
if("freetype" IN_LIST FEATURES)
|
|
list(APPEND OPTIONS -Dfreetype=enabled)
|
|
else()
|
|
list(APPEND OPTIONS -Dfreetype=disabled)
|
|
endif()
|
|
|
|
if ("x11" IN_LIST FEATURES)
|
|
if (VCPKG_TARGET_IS_WINDOWS)
|
|
message(FATAL_ERROR "Feature x11 only support UNIX.")
|
|
endif()
|
|
message(WARNING "You will need to install Xorg dependencies to use feature x11:\napt install libx11-dev libxft-dev\n")
|
|
list(APPEND OPTIONS -Dxlib=enabled)
|
|
else()
|
|
list(APPEND OPTIONS -Dxlib=disabled)
|
|
endif()
|
|
list(APPEND OPTIONS -Dxcb=disabled)
|
|
list(APPEND OPTIONS -Dxlib-xcb=disabled)
|
|
|
|
if("gobject" IN_LIST FEATURES)
|
|
if(VCPKG_TARGET_IS_WINDOWS AND VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
message(FATAL_ERROR "Feature gobject currently only supports dynamic build.")
|
|
endif()
|
|
list(APPEND OPTIONS -Dglib=enabled)
|
|
else()
|
|
list(APPEND OPTIONS -Dglib=disabled)
|
|
endif()
|
|
|
|
if(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW)
|
|
set(ENV{CPP} "cl_cpp_wrapper")
|
|
endif()
|
|
|
|
vcpkg_configure_meson(
|
|
SOURCE_PATH ${SOURCE_PATH}
|
|
OPTIONS ${OPTIONS}
|
|
-Dtests=disabled
|
|
-Dzlib=enabled
|
|
-Dpng=enabled
|
|
-Dspectre=auto
|
|
-Dgtk2-utils=disabled
|
|
-Dsymbol-lookup=disabled
|
|
)
|
|
vcpkg_install_meson()
|
|
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
|
|
|
set(_file "${CURRENT_PACKAGES_DIR}/include/cairo/cairo.h")
|
|
file(READ ${_file} CAIRO_H)
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
string(REPLACE "defined (CAIRO_WIN32_STATIC_BUILD)" "1" CAIRO_H "${CAIRO_H}")
|
|
else()
|
|
string(REPLACE "defined (CAIRO_WIN32_STATIC_BUILD)" "0" CAIRO_H "${CAIRO_H}")
|
|
endif()
|
|
file(WRITE ${_file} "${CAIRO_H}")
|
|
|
|
# Handle copyright
|
|
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
|
|
|
vcpkg_copy_pdbs()
|
|
vcpkg_fixup_pkgconfig()
|
|
|
|
#TODO: Fix script
|
|
#set(TOOLS)
|
|
#if(EXISTS "${CURRENT_PACKAGES_DIR}/bin/cairo-trace${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
|
|
# list(APPEND TOOLS cairo-trace) # sh script which needs to be fixed due to absolute paths in it.
|
|
#endif()
|
|
#vcpkg_copy_tools(TOOL_NAMES ${TOOLS} AUTO_CLEAN)
|
|
|
|
if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
|
|
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" "${CURRENT_PACKAGES_DIR}/debug/bin")
|
|
endif()
|