From c26b46ddcaae70d2a712ede474bd84135cc65b56 Mon Sep 17 00:00:00 2001 From: Christian Rauch Date: Tue, 29 Jun 2021 23:36:23 +0100 Subject: cmake: add 'wayland-protocols' to 'make deps' --- build_files/build_environment/CMakeLists.txt | 1 + build_files/build_environment/cmake/download.cmake | 1 + build_files/build_environment/cmake/harvest.cmake | 2 ++ build_files/build_environment/cmake/versions.cmake | 6 +++++ .../cmake/wayland_protocols.cmake | 27 ++++++++++++++++++++++ 5 files changed, 37 insertions(+) create mode 100644 build_files/build_environment/cmake/wayland_protocols.cmake (limited to 'build_files/build_environment') diff --git a/build_files/build_environment/CMakeLists.txt b/build_files/build_environment/CMakeLists.txt index fb79eee62be..62b4602a998 100644 --- a/build_files/build_environment/CMakeLists.txt +++ b/build_files/build_environment/CMakeLists.txt @@ -164,6 +164,7 @@ endif() if(UNIX AND NOT APPLE) include(cmake/libglu.cmake) include(cmake/mesa.cmake) + include(cmake/wayland_protocols.cmake) endif() include(cmake/harvest.cmake) diff --git a/build_files/build_environment/cmake/download.cmake b/build_files/build_environment/cmake/download.cmake index 27351ddee45..db90e9b40e9 100644 --- a/build_files/build_environment/cmake/download.cmake +++ b/build_files/build_environment/cmake/download.cmake @@ -87,6 +87,7 @@ download_source(LIBGLU) download_source(MESA) download_source(NASM) download_source(XR_OPENXR_SDK) +download_source(WL_PROTOCOLS) download_source(ISPC) download_source(GMP) download_source(POTRACE) diff --git a/build_files/build_environment/cmake/harvest.cmake b/build_files/build_environment/cmake/harvest.cmake index fc7e652a028..b94790507b2 100644 --- a/build_files/build_environment/cmake/harvest.cmake +++ b/build_files/build_environment/cmake/harvest.cmake @@ -126,6 +126,8 @@ if(UNIX AND NOT APPLE) harvest(xml2/include xml2/include "*.h") harvest(xml2/lib xml2/lib "*.a") + + harvest(wayland-protocols/share/wayland-protocols wayland-protocols/share/wayland-protocols/ "*.xml") else() harvest(blosc/lib openvdb/lib "*.a") harvest(xml2/lib opencollada/lib "*.a") diff --git a/build_files/build_environment/cmake/versions.cmake b/build_files/build_environment/cmake/versions.cmake index 38cadff2202..2d015440d5d 100644 --- a/build_files/build_environment/cmake/versions.cmake +++ b/build_files/build_environment/cmake/versions.cmake @@ -462,6 +462,12 @@ set(XR_OPENXR_SDK_HASH 0df6b2fd6045423451a77ff6bc3e1a75) set(XR_OPENXR_SDK_HASH_TYPE MD5) set(XR_OPENXR_SDK_FILE OpenXR-SDK-${XR_OPENXR_SDK_VERSION}.tar.gz) +set(WL_PROTOCOLS_VERSION 1.21) +set(WL_PROTOCOLS_FILE wayland-protocols-${WL_PROTOCOLS_VERSION}.tar.gz) +set(WL_PROTOCOLS_URI https://gitlab.freedesktop.org/wayland/wayland-protocols/-/archive/${WL_PROTOCOLS_VERSION}/${WL_PROTOCOLS_FILE}) +set(WL_PROTOCOLS_HASH af5ca07e13517cdbab33504492cef54a) +set(WL_PROTOCOLS_HASH_TYPE MD5) + if(BLENDER_PLATFORM_ARM) # Unreleased version with macOS arm support. set(ISPC_URI https://github.com/ispc/ispc/archive/f5949c055eb9eeb93696978a3da4bfb3a6a30b35.zip) diff --git a/build_files/build_environment/cmake/wayland_protocols.cmake b/build_files/build_environment/cmake/wayland_protocols.cmake new file mode 100644 index 00000000000..02db453be42 --- /dev/null +++ b/build_files/build_environment/cmake/wayland_protocols.cmake @@ -0,0 +1,27 @@ +# ***** BEGIN GPL LICENSE BLOCK ***** +# +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# ***** END GPL LICENSE BLOCK ***** + +ExternalProject_Add(external_wayland_protocols + URL file://${PACKAGE_DIR}/${WL_PROTOCOLS_FILE} + DOWNLOAD_DIR ${DOWNLOAD_DIR} + URL_HASH ${WL_PROTOCOLS_HASH_TYPE}=${WL_PROTOCOLS_HASH} + PREFIX ${BUILD_DIR}/wayland-protocols + CONFIGURE_COMMAND meson --prefix ${LIBDIR}/wayland-protocols . ../external_wayland_protocols -Dtests=false + BUILD_COMMAND ninja + INSTALL_COMMAND ninja install +) -- cgit v1.2.3