r21377 by craig -

scribus-commit scribus-commit at lists.scribus.net
Thu Jun 16 20:01:34 UTC 2016


Author: craig
Date: Thu Jun 16 20:01:34 2016
New Revision: 21377

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21377
Log:
Add better support for C++11/Qt 5.7.0. CMAKE minimum bumped to 3.2

Modified:
    trunk/Scribus/CMakeLists.txt

Modified: trunk/Scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21377&path=/trunk/Scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/CMakeLists.txt	(original)
+++ trunk/Scribus/CMakeLists.txt	Thu Jun 16 20:01:34 2016
@@ -3,8 +3,9 @@
 
 #Set our CMake minimum version
 #Require 2.8.9 for Qt5
+#Require 3.1.0 for Qt 5.7 C++ 11 easy support
 #Require 3.2.0 for add_custom_target with byproducts
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9 FATAL_ERROR)
+CMAKE_MINIMUM_REQUIRED(VERSION 3.2.0 FATAL_ERROR)
 
 #Pretty colors
 SET(CMAKE_COLOR_MAKEFILE ON)
@@ -382,6 +383,7 @@
 #C++11 Support
 IF(WANT_CPP11)
 	MESSAGE(STATUS "Enabling C++11 compiler features")
+	set(CMAKE_CXX_STANDARD 11)
 	ADD_DEFINITIONS("-std=c++11")
 ENDIF(WANT_CPP11)
 
@@ -519,15 +521,15 @@
 	SET(ENV{LD_PREBIND} 1 )
 	SET(ENV{LD_PREBIND_ALLOW_OVERLAP} 1 )
 	IF (WANT_DEBUG)
-		SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
+	    SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
 		SET(CMAKE_C_FLAGS_DEBUG "-O0 -g -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
 	ENDIF (WANT_DEBUG)
 	IF (WANT_RELEASEWITHDEBUG)
-		SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
+	    SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
 		SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
 	ENDIF (WANT_RELEASEWITHDEBUG)
 	IF (NOT WANT_DEBUG AND NOT WANT_RELEASEWITHDEBUG)
-		SET(CMAKE_CXX_FLAGS_RELEASE "-O2 -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
+	    SET(CMAKE_CXX_FLAGS_RELEASE "-O2 -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
 		SET(CMAKE_C_FLAGS_RELEASE "-O2 -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
 	ENDIF (NOT WANT_DEBUG AND NOT WANT_RELEASEWITHDEBUG)
 ELSE(APPLE)
@@ -551,7 +553,7 @@
 	SET(CMAKE_CXX_FLAGS_RELEASE)
 	SET(CMAKE_C_FLAGS_RELEASE)
 ELSE(${CMAKE_GENERATOR} MATCHES "^(Visual Studio|NMake).*")
-	SET(CMAKE_CXX_FLAGS_RELEASE "-O2 -Wall -fPIC")
+    SET(CMAKE_CXX_FLAGS_RELEASE "-O2 -Wall -fPIC")
 	SET(CMAKE_C_FLAGS_RELEASE "-O2 -Wall -fPIC")
 #	ADD_DEFINITIONS(-DNDEBUG)
 ENDIF(${CMAKE_GENERATOR} MATCHES "^(Visual Studio|NMake).*")
@@ -576,57 +578,57 @@
 SET(CMAKE_INCLUDE_CURRENT_DIR ON)
 FIND_PACKAGE(Qt5Core REQUIRED)
 IF(Qt5Core_FOUND)
-	MESSAGE(STATUS "----- USE QT 5-----")
+    MESSAGE(STATUS "----- USE QT 5-----")
 ELSE(Qt5Core_FOUND)
-	MESSAGE(FATAL_ERROR "ERROR: No QT 5 found")
+    MESSAGE(FATAL_ERROR "ERROR: No QT 5 found")
 ENDIF(Qt5Core_FOUND)
 FIND_PACKAGE(Qt5Widgets REQUIRED)
 IF(Qt5Widgets_FOUND)
-	MESSAGE(STATUS "----- USE QT Widgets-----")
+    MESSAGE(STATUS "----- USE QT Widgets-----")
 ELSE(Qt5Widgets_FOUND)
-	MESSAGE(FATAL_ERROR "ERROR: No QT Widgets found")
+    MESSAGE(FATAL_ERROR "ERROR: No QT Widgets found")
 ENDIF(Qt5Widgets_FOUND)
 FIND_PACKAGE(Qt5Gui REQUIRED)
 IF(Qt5Gui_FOUND)
-	MESSAGE(STATUS "----- USE Qt5Gui -----")
+    MESSAGE(STATUS "----- USE Qt5Gui -----")
 ELSE(Qt5Gui_FOUND)
-	MESSAGE(FATAL_ERROR "ERROR: Qt5Gui found")
+    MESSAGE(FATAL_ERROR "ERROR: Qt5Gui found")
 ENDIF(Qt5Gui_FOUND)
 FIND_PACKAGE(Qt5Xml REQUIRED)
 IF(Qt5Xml_FOUND)
-	MESSAGE(STATUS "----- USE QT 5 XML -----")
+    MESSAGE(STATUS "----- USE QT 5 XML -----")
 ELSE(Qt5Xml_FOUND)
-	MESSAGE(FATAL_ERROR "ERROR: No QT 5 XML found")
+    MESSAGE(FATAL_ERROR "ERROR: No QT 5 XML found")
 ENDIF(Qt5Xml_FOUND)
 FIND_PACKAGE(Qt5Network REQUIRED)
 IF(Qt5Network_FOUND)
-	MESSAGE(STATUS "----- USE Qt5Network -----")
+    MESSAGE(STATUS "----- USE Qt5Network -----")
 ELSE(Qt5Network_FOUND)
-	MESSAGE(FATAL_ERROR "ERROR: No Qt5Network found")
+    MESSAGE(FATAL_ERROR "ERROR: No Qt5Network found")
 ENDIF(Qt5Network_FOUND)
 FIND_PACKAGE(Qt5OpenGL REQUIRED)
 IF(Qt5OpenGL_FOUND)
-	MESSAGE(STATUS "----- USE Qt5OpenGL -----")
+    MESSAGE(STATUS "----- USE Qt5OpenGL -----")
 ELSE(Qt5OpenGL_FOUND)
-	MESSAGE(FATAL_ERROR "ERROR: No Qt5OpenGL found")
+    MESSAGE(FATAL_ERROR "ERROR: No Qt5OpenGL found")
 ENDIF(Qt5OpenGL_FOUND)
 FIND_PACKAGE(Qt5LinguistTools REQUIRED)
 IF(Qt5LinguistTools_FOUND)
-	MESSAGE(STATUS "----- USE Qt5LinguistTools -----")
+    MESSAGE(STATUS "----- USE Qt5LinguistTools -----")
 ELSE(Qt5LinguistTools_FOUND)
-	MESSAGE(FATAL_ERROR "ERROR: No Qt5LinguistTools found")
+    MESSAGE(FATAL_ERROR "ERROR: No Qt5LinguistTools found")
 ENDIF(Qt5LinguistTools_FOUND)
 FIND_PACKAGE(Qt5Quick REQUIRED)
 IF(Qt5Quick_FOUND)
-	MESSAGE(STATUS "----- USE Qt5Quick -----")
+    MESSAGE(STATUS "----- USE Qt5Quick -----")
 ELSE(Qt5Quick_FOUND)
-	MESSAGE(FATAL_ERROR "ERROR: No Qt5Quick found")
+    MESSAGE(FATAL_ERROR "ERROR: No Qt5Quick found")
 ENDIF(Qt5Quick_FOUND)
 FIND_PACKAGE(Qt5PrintSupport REQUIRED)
 IF(Qt5PrintSupport_FOUND)
-	MESSAGE(STATUS "----- USE Qt5PrintSupport -----")
+    MESSAGE(STATUS "----- USE Qt5PrintSupport -----")
 ELSE(Qt5PrintSupport_FOUND)
-	MESSAGE(FATAL_ERROR "ERROR: No Qt5PrintSupport found")
+    MESSAGE(FATAL_ERROR "ERROR: No Qt5PrintSupport found")
 ENDIF(Qt5PrintSupport_FOUND)
 INCLUDE_DIRECTORIES(${Qt5Core_INCLUDE_DIRS})
 ADD_DEFINITIONS(${Qt5Core_DEFINITIONS})
@@ -644,6 +646,8 @@
 ADD_DEFINITIONS(${Qt5Quick_DEFINITIONS})
 INCLUDE_DIRECTORIES(${Qt5PrintSupport_INCLUDE_DIRS})
 ADD_DEFINITIONS(${Qt5PrintSupport_DEFINITIONS})
+
+MESSAGE(STATUS "Qt VERSION: ${Qt5Widgets_VERSION}")
 #>> Qt
 
 #<< ZLIB, PNG




More information about the scribus-commit mailing list