[Bf-blender-cvs] [1482150de27] wl_default7: cmake: add 'wayland-protocols' to 'make deps'

Christian Rauch noreply at git.blender.org
Sat Jul 3 17:03:10 CEST 2021


Commit: 1482150de2719e5201fa071c26f9c6d6f75a125c
Author: Christian Rauch
Date:   Tue Jun 29 23:36:23 2021 +0100
Branches: wl_default7
https://developer.blender.org/rB1482150de2719e5201fa071c26f9c6d6f75a125c

cmake: add 'wayland-protocols' to 'make deps'

===================================================================

M	build_files/build_environment/CMakeLists.txt
M	build_files/build_environment/cmake/harvest.cmake
M	build_files/build_environment/cmake/versions.cmake
A	build_files/build_environment/cmake/wayland_protocols.cmake

===================================================================

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/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..43217fa9238 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_URI https://gitlab.freedesktop.org/wayland/wayland-protocols/-/archive/${WL_PROTOCOLS_VERSION}/wayland-protocols-${WL_PROTOCOLS_VERSION}.tar.gz)
+set(WL_PROTOCOLS_HASH af5ca07e13517cdbab33504492cef54a)
+set(WL_PROTOCOLS_HASH_TYPE MD5)
+set(WL_PROTOCOLS_FILE wayland-protocols-${WL_PROTOCOLS_VERSION}.tar.gz)
+
 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..380c8b6fde1
--- /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 ${WL_PROTOCOLS_URI}
+  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 ${DEFAULT_CMAKE_FLAGS}
+  BUILD_COMMAND ninja
+  INSTALL_COMMAND ninja install
+)



More information about the Bf-blender-cvs mailing list