[Bf-blender-cvs] [51691f338ea] wl_default: cmake: add 'wayland-protocols' to 'deps' make step

Christian Rauch noreply at git.blender.org
Thu Jul 1 23:49:56 CEST 2021


Commit: 51691f338ea1347fc977ab812112431181a2a708
Author: Christian Rauch
Date:   Tue Jun 29 23:36:23 2021 +0100
Branches: wl_default
https://developer.blender.org/rB51691f338ea1347fc977ab812112431181a2a708

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

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

M	build_files/build_environment/CMakeLists.txt
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..b0891ec2559 100644
--- a/build_files/build_environment/CMakeLists.txt
+++ b/build_files/build_environment/CMakeLists.txt
@@ -159,6 +159,7 @@ if(UNIX)
   include(cmake/lzma.cmake)
   include(cmake/ssl.cmake)
   include(cmake/sqlite.cmake)
+  include(cmake/wayland_protocols.cmake)
 endif()
 
 if(UNIX AND NOT APPLE)
diff --git a/build_files/build_environment/cmake/versions.cmake b/build_files/build_environment/cmake/versions.cmake
index d93b8463b4b..61da25ab15e 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..18be0c215d3
--- /dev/null
+++ b/build_files/build_environment/cmake/wayland_protocols.cmake
@@ -0,0 +1,37 @@
+# ***** 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 *****
+
+# Note the utility apps may use png/tiff/gif system libraries, but the
+# library itself does not depend on them, so should give no problems.
+
+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 ${DEFAULT_CMAKE_FLAGS}
+  BUILD_COMMAND ninja
+  INSTALL_COMMAND ninja install
+)
+
+ExternalProject_Add_Step(external_wayland_protocols after_install
+  COMMAND ${CMAKE_COMMAND} -E copy_directory ${LIBDIR}/wayland-protocols ${HARVEST_TARGET}/wayland-protocols
+  DEPENDEES install
+)
+
+list(APPEND CMAKE_PREFIX_PATH "${HARVEST_TARGET}/wayland-protocols/share/pkgconfig/")



More information about the Bf-blender-cvs mailing list