vcpkg/ports/xcb-proto/portfile.cmake
Alexander Neumann 552f1ee5f8
[Part1|xwindow PR] Split up to dbus (#22642)
* first batch of xwindow PR ports - up to dbus

* first batch of xwindow PR ports - up to dbus

* format manifest

* version stuff

* remove if block

* version stuff

* fix xcb hash

* fix xproto dependency on meson blocking cross builds

* adjust message

* use X11_xcb_LIB

* version stuff

* put xlib arm64-windows on baseline

* fix dbus on osx and linux

* version stuff

* forget to set the value

* fix --export-dynamic on osx

* version dbus

* ci-retrigger

* add license (needs tool update)

* version adjustments

* version update

* remove unnecessary comments

* v db

* Apply suggestions from code review

Co-authored-by: Billy O'Neal <bion@microsoft.com>

* nitpicks

* rename xau to libxau

* use vcpkg_install_copyright and silence usage

* xtrans silence usage

* format-manifest

* v db

* make license null for ports without exact match

* xdmcp rename to libxdmcp

* merge x11 wrapper into xlib
rename xlib to libx11 to avoid a metaport

* v db

* missed dbus depending on x11.

* v db

* Update scripts/ci.baseline.txt

Co-authored-by: LilyWangLL <94091114+LilyWangLL@users.noreply.github.com>
Co-authored-by: Alexander Neumann <you@example.com>
Co-authored-by: JackBoosY <yuzaiyang@beyondsoft.com>
Co-authored-by: Billy O'Neal <bion@microsoft.com>
2022-08-22 12:26:13 -07:00

50 lines
2.0 KiB
CMake

set(VCPKG_POLICY_EMPTY_INCLUDE_FOLDER enabled)
if(NOT X_VCPKG_FORCE_VCPKG_X_LIBRARIES AND NOT VCPKG_TARGET_IS_WINDOWS)
message(STATUS "Utils and libraries provided by '${PORT}' should be provided by your system! Install the required packages or force vcpkg libraries by setting X_VCPKG_FORCE_VCPKG_X_LIBRARIES in your triplet")
set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
else()
find_program(XMLLINT_PATH NAMES xmllint PATHS "${CURRENT_HOST_INSTALLED_DIR}/tools/libxml2")
if(NOT XMLLINT_PATH)
message(FATAL_ERROR "${PORT} requires xmllint which was not found!")
endif()
string(REGEX REPLACE "/[^/]+$" "" XMLLINT_DIR "${XMLLINT_PATH}")
file(TO_NATIVE_PATH "${XMLLINT_DIR}" XMLLINT_DIR_NATIVE)
message(STATUS "Using xmlling at: ${XMLLINT_PATH}")
vcpkg_add_to_path("${XMLLINT_DIR_NATIVE}")
vcpkg_find_acquire_program(PYTHON3)
get_filename_component(PYTHON3_DIR "${PYTHON3}" DIRECTORY)
file(TO_NATIVE_PATH "${PYTHON3_DIR}" PYTHON3_DIR_NATIVE)
vcpkg_add_to_path("${PYTHON3_DIR}")
set(ENV{PYTHON} "${PYTHON3}")
vcpkg_from_gitlab(
GITLAB_URL https://gitlab.freedesktop.org/xorg
OUT_SOURCE_PATH SOURCE_PATH
REPO proto/xcbproto
REF 70ca65fa35c3760661b090bc4b2601daa7a099b8 #v1.14.1 + patches
SHA512 9e08e1d2ab1fe7a8d3985568918a858ddfb31b8016ccac8ea2447631e7cede3bcc7b1ed86491d497ab871674c9b55d94fab25ee13ff6de9a44590b91d9166fda
HEAD_REF master
)
set(ENV{ACLOCAL} "aclocal -I \"${CURRENT_INSTALLED_DIR}/share/xorg/aclocal/\"")
vcpkg_configure_make(
SOURCE_PATH "${SOURCE_PATH}"
AUTOCONFIG
OPTIONS
ac_cv_path_PYTHON='${PYTHON3}'
am_cv_python_pyexecdir=\\\${prefix}/tools/python3/site-packages
am_cv_python_pythondir=\\\${prefix}/tools/python3/site-packages
)
vcpkg_install_make()
vcpkg_fixup_pkgconfig()
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
endif()