mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-16 16:09:02 +08:00
163065a352
* update meson to 0.60.1 * add port vcpkg-tool-meson for consistency deprecate usage of tool-meson * [skip actions] make every port using meson depend on vcpkg-tool-meson (except pkgconf for now.) * fix subtle bugs in vcpkg_find_acquire_program make the port install meson if the system does not provide it. * make pkgconf depend on meson * restore old vcpkg_find_acquire_program behavior for versioning * Update ports/gstreamer/vcpkg.json remove duplicated dependency * remove invalid option in glib * [skip actions] fix ci failures? * remove invalid option in gstreamer * try without cmake * get more logs from meson configure. * update glib to 2.70.1 * fix typo * fix pc file of flac * update meson to 0.60.2 * try the patch from the other pr. * patch meson ..... * version stuff * fix port version * fix gstreamer version * remove version * format-manifest * version stuff * format manifest again * revert version stuff * remove outdated gtk options * version stuff * pango version stuff * correct baseline lost in merge * Fix fontconfig version db Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
89 lines
2.8 KiB
CMake
89 lines
2.8 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 156cd3eaaebfd8635517c2baf61fcf3627ff7ec2 #v1.17.4
|
|
SHA512 2c516ad3ffe56cf646b2435d6ef3cf25e8c05aeb13d95dd18a7d0510d134d9990cba1b376063352ff99483cfc4e5d2af849afd2f9538f9136f22d44d34be362c
|
|
HEAD_REF master
|
|
PATCHES 0001-meson-fix-macOS-build-and-add-macOS-ci.patch
|
|
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) don't forget this option with the next update!
|
|
|
|
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
|
|
)
|
|
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()
|