r18447 by craig - Remove USE_QT5 and all the Qt4 only code. Remove some QT version >4 code. Remove some cmake 2.6 cmake code, Set minimum cmake to 2.8.9 and qt min version to 5.0.0

scribus-commit scribus-commit at lists.scribus.net
Tue Sep 3 20:08:46 UTC 2013


Author: craig
Date: Tue Sep  3 20:08:46 2013
New Revision: 18447

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=18447
Log:
Remove USE_QT5 and all the Qt4 only code. Remove some QT version >4 code. Remove some cmake 2.6 cmake code, Set minimum cmake to 2.8.9 and qt min version to 5.0.0

Modified:
    trunk/Scribus/CMakeLists.txt

Modified: trunk/Scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=18447&path=/trunk/Scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/CMakeLists.txt (original)
+++ trunk/Scribus/CMakeLists.txt Tue Sep  3 20:08:46 2013
@@ -2,15 +2,8 @@
 ########## CMake Setup                                                                              ##########
 
 #Set our CMake minimum version
-#Require 2.4.2 for Qt finding
-#Require 2.4.3 for moc change detection and rpath updates for custom cairo install
-CMAKE_MINIMUM_REQUIRED(VERSION 2.6.0 FATAL_ERROR)
-
-#IF(WIN32)
-#  IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.6)
-#    MESSAGE(FATAL_ERROR "Windows builds require CMake 2.6")
-#  ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.6)
-#ENDIF(WIN32)
+#Require 2.8.9 for Qt5
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9 FATAL_ERROR)
 
 #Pretty colors
 SET(CMAKE_COLOR_MAKEFILE ON)
@@ -42,34 +35,6 @@
 ##############################################################################################################
 ########## toplevel compiler flags                                                                  ##########
 MESSAGE(STATUS "Shared Library Flags: ${CMAKE_SHARED_LIBRARY_C_FLAGS}")
-# CHECK_C_COMPILER_FLAG(" ${CMAKE_SHARED_LIBRARY_C_FLAGS}" C_HAVE_PIC)
-# CHECK_CXX_COMPILER_FLAG(" ${CMAKE_SHARED_LIBRARY_C_FLAGS}" CXX_HAVE_PIC)
-# IF (CXX_HAVE_PIC AND C_HAVE_PIC)
-#     SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_SHARED_LIBRARY_C_FLAGS}")
-#     SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_SHARED_LIBRARY_C_FLAGS}")
-# ELSE (CXX_HAVE_PIC AND C_HAVE_PIC)
-#     MESSAGE(FATAL_ERROR "Shared library support is missing")
-# ENDIF (CXX_HAVE_PIC AND C_HAVE_PIC)
-
-# SET(CMAKE_SHARED_MODULE_LINK_FLAGS "${CMAKE_SHARED_MODULE_LINK_FLAGS} -export-dynamic")
-# SET(CMAKE_SHARED_MODULE_LINK_CXX_FLAGS "${CMAKE_SHARED_MODULE_LINK_CXX_FLAGS} -export-dynamic")
-# SET(CMAKE_SHARED_LIBRARY_C_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS} -export-dynamic")
-# SET(CMAKE_SHARED_LIBRARY_CXX_FLAGS "${CMAKE_SHARED_LIBRARY_CXX_FLAGS} -export-dynamic")
-# MESSAGE(STATUS ${CMAKE_SHARED_MODULE_LINK_FLAGS})
-# MESSAGE(STATUS ${CMAKE_SHARED_MODULE_LINK_CXX_FLAGS})
-# MESSAGE(STATUS ${CMAKE_SHARED_LIBRARY_C_FLAGS})
-# MESSAGE(STATUS ${CMAKE_SHARED_LIBRARY_CXX_FLAGS})
-# MESSAGE(STATUS ${CMAKE_CXX_CREATE_SHARED_MODULE})
-# MESSAGE(STATUS ${CMAKE_CXX_CREATE_SHARED_LIBRARY})
-
-#IMPORT FROM COMMANDLINE
-# SET with cmake -DWANT_CAIRO=1, etc
-# MESSAGE(STATUS ${WANT_CAIRO})
-# MESSAGE(STATUS ${WANT_LIBART})
-# MESSAGE(STATUS ${WANT_DEBUG})
-
-# SET(WANT_CAIRO 0)
-# SET(WANT_LIBART 1)
 
 #Project Setup
 PROJECT(scribus)
@@ -444,8 +409,7 @@
 ########## Find Dependencies                                                                        ##########
 
 #<< Qt
-IF(USE_QT5)
-	CMAKE_MINIMUM_REQUIRED(VERSION 2.8.9)
+	SET (QT_MIN_VERSION "5.0.0")
 	SET(CMAKE_PREFIX_PATH "${QT_PREFIX}/lib/cmake")
 	SET(CMAKE_INCLUDE_CURRENT_DIR ON)
 	FIND_PACKAGE(Qt5Core REQUIRED)
@@ -518,61 +482,6 @@
 	ADD_DEFINITIONS(${Qt5Network_DEFINITIONS})
 	INCLUDE_DIRECTORIES(${Qt5OpenGL_INCLUDE_DIRS})
 	ADD_DEFINITIONS(${Qt5OpenGL_DEFINITIONS})
-	ADD_DEFINITIONS(-DUSE_QT5)
-
-ELSE(USE_QT5)
-	SET (QT_MT_REQUIRED TRUE)
-	SET (QT_MIN_VERSION "4.7.0")
-	IF (APPLE)
-		IF (WANT_QT4MAC_COCOA)
-			SET (QT_MAC_USE_COCOA TRUE)
-		ENDIF (WANT_QT4MAC_COCOA)
-		SET( QT_USE_QTSQL TRUE )
-	ENDIF (APPLE)
-	IF (WANT_QT3SUPPORT)
-		SET (QT_USE_QT3SUPPORT TRUE)
-	ELSE (WANT_QT3SUPPORT)
-		SET (QT_USE_QT3SUPPORT FALSE)
-	ENDIF (WANT_QT3SUPPORT)
-	SET (QT_USE_QTXML TRUE )
-	SET (QT_USE_QTWEBKIT TRUE )
-	SET (QT_USE_QTOPENGL TRUE )
-	SET( QT_USE_QTNETWORK TRUE )
-	FIND_PACKAGE(Qt4 REQUIRED)
-	INCLUDE( ${QT_USE_FILE} )
-	IF (QT_FOUND)
-		MESSAGE("Qt4 Found OK")
-  # we wont turn around, lets make it required
-	IF(QT_QTWEBKIT_FOUND)
-		MESSAGE(STATUS "QtWebkit Found OK")
-	ELSE(QT_QTWEBKIT_FOUND)
-		MESSAGE(FATAL_ERROR "QtWebKit not found")
-	ENDIF(QT_QTWEBKIT_FOUND)
-
-	IF (QT_VERSION_MAJOR EQUAL 4 AND QT_VERSION_MINOR EQUAL 4 AND QT_VERSION_PATCH EQUAL 0)
-		MESSAGE(STATUS "Warning: Qt 4.4.0 has some bugs relating to decimal notation and line drawing. Please refer to Scribus bug 6999 and 7187 for information and to check if this may affect your use. Please use 4.4.1+ on release for your platform/distribution.")
-	ENDIF (QT_VERSION_MAJOR EQUAL 4 AND QT_VERSION_MINOR EQUAL 4 AND QT_VERSION_PATCH EQUAL 0)
-	IF (QT_VERSION_MAJOR EQUAL 4 AND QT_VERSION_MINOR EQUAL 3)
-		MESSAGE(STATUS "Warning: Some versions of Qt 4.3.x have a bug influencing layout in the Scribus Properties Palette (refer to Scribus bug 7107). Please upgrade to Qt 4.4.1+ on release (4.4.0 has a decimal notation bug)")
-	ENDIF (QT_VERSION_MAJOR EQUAL 4 AND QT_VERSION_MINOR EQUAL 3)
-	IF (WANT_QT3SUPPORT)
-		MESSAGE(STATUS "Building with Qt3 Support")
-	ELSE (WANT_QT3SUPPORT)
-		MESSAGE(STATUS "Building without Qt3 Support (GOOD)")
-	ENDIF (WANT_QT3SUPPORT)
-	#Add our Qt definitions
-	ADD_DEFINITIONS(
-		${QT_DEFINITIONS}
-		-DQT_CORE_LIB
-		-DQT_GUI_LIB
-		-DQT_THREAD_LIB
-		-DQT_XML_LIB
-		-DQT_GL_LIB
-		)
-	ELSE(QT_FOUND)
-		MESSAGE(FATAL_ERROR "No Qt4 found")
-	ENDIF(QT_FOUND)
-ENDIF(USE_QT5)
 #>> Qt
 
 #<< ZLIB, PNG
@@ -632,17 +541,6 @@
 #>> PYTHON
 
 #<< FreeType2
-IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.6)
-  SET(FREETYPE_DIR ${CMAKE_MODULE_PATH})
-  FIND_PACKAGE(FREETYPE REQUIRED)
-  IF (FREETYPE_FOUND)
-    MESSAGE("FreeType2 Library Found OK")
-    INCLUDE(CheckLibraryExists)
-    CHECK_LIBRARY_EXISTS(${FREETYPE_LIBRARY} FT_Get_First_Char "" HAVE_FREETYPE_FIRST)
-    CHECK_LIBRARY_EXISTS(${FREETYPE_LIBRARY} FT_Get_Next_Char "" HAVE_FREETYPE_NEXT)
-  ENDIF(FREETYPE_FOUND)
-  SET(CFLAGS "${CFLAGS}"."${LIBFREETYPE_CFLAGS}")
-ELSE(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.6)
   FIND_PACKAGE(Freetype REQUIRED)
   IF (FREETYPE_FOUND)
     MESSAGE(STATUS "FreeType2 Library Found OK")
@@ -656,7 +554,6 @@
   ELSE (FREETYPE_FOUND)
     MESSAGE(FATAL_ERROR "No Freetype Found")
   ENDIF(FREETYPE_FOUND)
-ENDIF(${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.6)
 #>> FreeType2
 
 #<<Render Library
@@ -721,9 +618,6 @@
 
 #<<CUPS
 IF(NOT WIN32 AND NOT HAIKU)
-  IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5)
-    SET(Cups_DIR ${CMAKE_MODULE_PATH})
-  ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5)
   FIND_PACKAGE(Cups REQUIRED)
   IF(CUPS_FOUND)
     SET(HAVE_CUPS 1)
@@ -736,9 +630,6 @@
 #>>CUPS
 
 #<<LibXML2
-IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5)
-  SET(LibXml2_DIR ${CMAKE_MODULE_PATH})
-ENDIF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.5)
 FIND_PACKAGE(LibXml2 REQUIRED)
 IF(LIBXML2_FOUND)
   SET(HAVE_XML 1)
@@ -784,19 +675,6 @@
   SET(FONTCONFIG_INCLUDE_DIR)
 ENDIF(NOT WIN32)
 #>>FontConfig
-
-#<<ASPELL for Speelling support
-#OPTION(WITH_ASPELL "Enable support for spell checking" ON)
-#IF (WITH_ASPELL)
-#  FIND_PACKAGE(ASPELL)
-#  IF (ASPELL_FOUND)
-#	MESSAGE("ASpell Found OK")
-#	SET(HAVE_ASPELL 1)
-#  ELSE (ASPELL_FOUND)
-#	MESSAGE("ASpell or its developer libraries NOT found - Disabling support for spell checking")
-#  ENDIF (ASPELL_FOUND)
-#ENDIF (WITH_ASPELL)
-#>>ASPELL for Speelling support
 
 #<<HUNSPELL for Speelling support
 OPTION(WANT_HUNSPELL "Enable support for spell checking with hunspell" ON)




More information about the scribus-commit mailing list