]> source.dussan.org Git - tigervnc.git/commitdiff
Raise CMake requirement to 3.10 1366/head
authorPierre Ossman <ossman@cendio.se>
Fri, 5 Nov 2021 11:53:11 +0000 (12:53 +0100)
committerPierre Ossman <ossman@cendio.se>
Fri, 5 Nov 2021 12:36:37 +0000 (13:36 +0100)
It's difficult to support both old and new versions, so raise the
requirement to the oldest that is commonly used, which is CMake 3.10.2
on Ubuntu 18.04.

.github/containers/centos7/build.sh
CMakeLists.txt
contrib/packages/rpm/el7/SPECS/tigervnc.spec
contrib/packages/rpm/el8/SPECS/tigervnc.spec
java/CMakeLists.txt

index 55ad8107cc02840780e5e69d927e21eb8403fd95..ad55b20e04e20d71aa330008d324b6a65723bb22 100755 (executable)
@@ -33,6 +33,7 @@ sed -i "s/@VERSION@/${VERSION}/" ${CURDIR}/rpmbuild/SPECS/tigervnc.spec
 
 docker run --volume ${CURDIR}/rpmbuild:/home/rpm/rpmbuild --interactive --rm tigervnc/${DOCKER} \
        bash -c "
+       sudo yum install -y epel-release &&
        sudo yum-builddep -y ~/rpmbuild/SPECS/tigervnc.spec &&
         sudo chown 0.0 ~/rpmbuild/SOURCES/* &&
         sudo chown 0.0 ~/rpmbuild/SPECS/* &&
index 3f54fbfe9bc12cb97848f8bab2402efbddd59d25..50247c7dac234065b5844167558eb768348059b9 100644 (file)
@@ -2,13 +2,7 @@
 # Setup
 #
 
-cmake_minimum_required(VERSION 2.8.11)
-if(POLICY CMP0022)
-  cmake_policy(SET CMP0022 OLD)
-endif()
-if(${CMAKE_VERSION} VERSION_LESS "3.4.0")
-  message(WARNING "CMake 3.4.0 or newer is required to get correct default installation paths")
-endif()
+cmake_minimum_required(VERSION 3.10.0)
 
 # Internal cmake modules
 set(CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/Modules)
@@ -117,20 +111,6 @@ else()
   message(STATUS "32-bit build")
 endif()
 
-# Versions of CMake before 2.8.7 do not properly support resource compilation
-# with MinGW.  Boo!
-if(MINGW AND "${CMAKE_VERSION}" VERSION_LESS "2.8.7")
-  if(NOT DEFINED RC)
-    set(CMAKE_RC_COMPILER_INIT windres)
-  else()
-    set(CMAKE_RC_COMPILER_INIT ${RC})
-  endif()
-  enable_language(RC)
-  message(STATUS "Resource compiler: ${CMAKE_RC_COMPILER}")
-  set(CMAKE_RC_COMPILE_OBJECT
-    "<CMAKE_RC_COMPILER> <FLAGS> <DEFINES> -o <OBJECT> --output-format=coff <SOURCE>")
-endif()
-
 # MinGW64 has header support but no library support for IActiveDesktop, so we
 # need to check for both the header and library and use our own implementation
 # in common/os if either doesn't exist.
index 52eea0012dccffe2dcc452bbc194576fa988c6b0..da9fdd3254a7730ed890547febf5f54251866c1c 100644 (file)
@@ -26,7 +26,7 @@ BuildRequires:  mesa-libGL-devel, libXinerama-devel, ImageMagick
 BuildRequires:  freetype-devel, libXdmcp-devel, libXfont2-devel
 BuildRequires:  libXrandr-devel, fltk-devel >= 1.3.3
 BuildRequires:  libjpeg-turbo-devel, gnutls-devel, pam-devel
-BuildRequires:  systemd, cmake, selinux-policy-devel
+BuildRequires:  systemd, cmake3, selinux-policy-devel
 BuildRequires:  libpng-devel
 BuildRequires:  zlib-devel
 
@@ -160,11 +160,7 @@ export CPPFLAGS="$CXXFLAGS"
 
 export CMAKE_EXE_LINKER_FLAGS=$LDFLAGS
 
-# The cmake in RHEL is too old and doesn't set up
-# CMAKE_INSTALL_SYSCONFDIR properly
-%{cmake} -G"Unix Makefiles" \
-  -DCMAKE_INSTALL_SYSCONFDIR:PATH=%{_sysconfdir} \
-  -DBUILD_STATIC=off
+%{cmake3} -G"Unix Makefiles" -DBUILD_STATIC=off
 make %{?_smp_mflags}
 
 pushd unix/xserver
index 2a4e4dbd171f134077bd2fcb54ce90f9bcd681bc..090b7bde4288a20d8240c45490cbba69f1cdfd25 100644 (file)
@@ -161,11 +161,7 @@ export CPPFLAGS="$CXXFLAGS"
 
 export CMAKE_EXE_LINKER_FLAGS=$LDFLAGS
 
-# The cmake in RHEL is too old and doesn't set up
-# CMAKE_INSTALL_SYSCONFDIR properly
-%{cmake} -G"Unix Makefiles" \
-  -DCMAKE_INSTALL_SYSCONFDIR:PATH=%{_sysconfdir} \
-  -DBUILD_STATIC=off
+%{cmake} -G"Unix Makefiles" -DBUILD_STATIC=off
 make %{?_smp_mflags}
 
 pushd unix/xserver
index 24498d3f9433ce4f495a76ae950dd65a22131669..26eb02af63e7d4d076241e464ed044bc130865cf 100644 (file)
@@ -1,4 +1,4 @@
-cmake_minimum_required(VERSION 2.8.11)
+cmake_minimum_required(VERSION 3.10.0)
 
 project(tigervnc-java Java)
 if(NOT VERSION)