r24340 by craig - Change CMake minimum to 3.14 and use included FindFontconfig. Rearrange

scribus-commit scribus-commit at lists.scribus.net
Mon Dec 21 22:29:15 UTC 2020


Author: craig
Date: Mon Dec 21 22:29:15 2020
New Revision: 24340

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24340
Log:
Change CMake minimum to 3.14 and use included FindFontconfig. Rearrange
CMake version code a little prior to some includes that need to know
about required languages.

Modified:
    trunk/Scribus/CMakeLists.txt

Modified: trunk/Scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24340&path=/trunk/Scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/CMakeLists.txt	(original)
+++ trunk/Scribus/CMakeLists.txt	Mon Dec 21 22:29:15 2020
@@ -6,13 +6,13 @@
 #Require 3.1.0 for Qt 5.7 C++ 11 easy support
 #Require 3.2.0 for add_custom_target with byproducts
 #Require 3.12 for new Find Python modules
-#TODO: as soon as we require 3.14.0, use the Cmake own modules for
-# - Fontconfig
-
-cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
+#Require 3.14 for new Fontconfig module
+
+cmake_minimum_required(VERSION 3.14.0 FATAL_ERROR)
 if (WANT_QT6)
 	cmake_minimum_required(VERSION 3.16.0)
 endif()
+cmake_policy(SET CMP0048 NEW)
 message(STATUS "CMake Version: ${CMAKE_VERSION}")
 if (WANT_PCH)
 	if(${CMAKE_VERSION} VERSION_LESS "3.16.0")
@@ -25,55 +25,6 @@
 	set(WANT_PCH OFF)
 	message(STATUS "Precompiled headers disabled")
 endif()
-
-
-# Configure CCache if available and wanted
-if (WANT_CCACHE)
-	find_program(CCACHE_FOUND ccache)
-	if(CCACHE_FOUND)
-		message(STATUS "Enabling ccache")
-		set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
-		set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
-	endif()
-endif()
-
-#Pretty colors
-set(CMAKE_COLOR_MAKEFILE ON)
-#Don't force verbose
-set(CMAKE_VERBOSE_MAKEFILE OFF)
-#Include current dir
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-#Don't allow in source builds
-#set(CMAKE_DISABLE_SOURCE_CHANGES ON)
-#set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
-
-
-#RPATH setup - more below too
-if (WANT_NORPATH OR WANT_DISTROBUILD)
-	set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
-else()
-	set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
-endif()
-set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
-set(CMAKE_SKIP_RULE_DEPENDENCY TRUE)
-set(CMAKE_SKIP_BUILD_RPATH TRUE)
-
-include(CheckIncludeFile)
-include(CheckCCompilerFlag)
-include(CheckCXXCompilerFlag)
-include(CheckTypeSize)
-include(TestBigEndian)
-include(GNUInstallDirs)
-#include(FeatureSummary)
-
-#enable_testing()
-
-#Set the custom CMake module directory where our include/lib finders are
-set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
-
-##############################################################################################################
-########## toplevel compiler flags                                                                  ##########
-message(STATUS "Shared Library Flags: ${CMAKE_SHARED_LIBRARY_C_FLAGS}")
 
 #Set our version values
 #Final version is ${VERSION} = ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_SUFFIX}
@@ -92,13 +43,62 @@
 
 #Project Setup
 #Do this now, prior to adding the suffix for SVN
-project(scribus VERSION ${VERSION})
-#LANGUAGES CXX)
+project(scribus VERSION ${VERSION}) # LANGUAGES CXX C)
 
 if (VERSION_SUFFIX)
 	set (VERSION ${VERSION}.${VERSION_SUFFIX})
 endif()
 message(STATUS "Scribus ${VERSION} will be built and installed into ${CMAKE_INSTALL_PREFIX}")
+
+# Configure CCache if available and wanted
+if (WANT_CCACHE)
+	find_program(CCACHE_FOUND ccache)
+	if(CCACHE_FOUND)
+		message(STATUS "Enabling ccache")
+		set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache)
+		set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache)
+	endif()
+endif()
+
+#Pretty colors
+set(CMAKE_COLOR_MAKEFILE ON)
+#Don't force verbose
+set(CMAKE_VERBOSE_MAKEFILE OFF)
+#Include current dir
+set(CMAKE_INCLUDE_CURRENT_DIR ON)
+#Don't allow in source builds
+#set(CMAKE_DISABLE_SOURCE_CHANGES ON)
+#set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
+
+
+#RPATH setup - more below too
+if (WANT_NORPATH OR WANT_DISTROBUILD)
+	set(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
+else()
+	set(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
+endif()
+set(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
+set(CMAKE_SKIP_RULE_DEPENDENCY TRUE)
+set(CMAKE_SKIP_BUILD_RPATH TRUE)
+
+include(CheckIncludeFile)
+include(CheckCCompilerFlag)
+include(CheckCXXCompilerFlag)
+include(CheckTypeSize)
+include(TestBigEndian)
+include(GNUInstallDirs)
+#include(FeatureSummary)
+
+#enable_testing()
+
+#Set the custom CMake module directory where our include/lib finders are
+set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules")
+
+##############################################################################################################
+########## toplevel compiler flags                                                                  ##########
+message(STATUS "Shared Library Flags: ${CMAKE_SHARED_LIBRARY_C_FLAGS}")
+
+
 
 
 #Set the permissions to be used when installing plugins




More information about the scribus-commit mailing list