r24859 by craig - Clean up Qt5 support and older C++ standard support

scribus-commit scribus-commit at lists.scribus.net
Sun Jan 30 15:40:33 UTC 2022


Author: craig
Date: Sun Jan 30 15:40:33 2022
New Revision: 24859

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24859
Log:
Clean up Qt5 support and older C++ standard support

Modified:
    trunk/Scribus/CMakeLists.txt
    trunk/Scribus/scribus/CMakeLists.txt

Modified: trunk/Scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24859&path=/trunk/Scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/CMakeLists.txt	(original)
+++ trunk/Scribus/CMakeLists.txt	Sun Jan 30 15:40:33 2022
@@ -12,10 +12,6 @@
 cmake_minimum_required(VERSION 3.16.0 FATAL_ERROR)
 #keep just in case this changes
 
-SET(WANT_QT6 ON)
-#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)
@@ -398,20 +394,20 @@
 endif()
 
 #C++11 Support
-#as of 1.5.5.svn, require C++11
-#if (WANT_QT6)
+#as of 1.7.0.svn, require C++17
+#yes the below conditions suggest 20/23 support. Yeah, nah..
 set (WANT_CPP17 ON)
-#endif()
-if(NOT WANT_CPP14 AND NOT WANT_CPP17)
-	message(STATUS "Enabling C++11 compiler features")
-	set(CMAKE_CXX_STANDARD 11)
-endif()
-if (WANT_CPP14)
-	message(STATUS "Enabling C++14 compiler features")
-	set(CMAKE_CXX_STANDARD 14)
-elseif(WANT_CPP17)
-		message(STATUS "Enabling C++17 compiler features")
-		set(CMAKE_CXX_STANDARD 17)
+
+if(NOT WANT_CPP20 AND NOT WANT_CPP23)
+	message(STATUS "Enabling C++17 compiler features")
+	set(CMAKE_CXX_STANDARD 17)
+endif()
+if (WANT_CPP20)
+	message(STATUS "Enabling C++20 compiler features")
+	set(CMAKE_CXX_STANDARD 20)
+elseif(WANT_CPP23)
+	    message(STATUS "Enabling C++23 compiler features")
+		set(CMAKE_CXX_STANDARD 23)
 endif()
 set (CMAKE_CXX_STANDARD_REQUIRED ON)
 set (CMAKE_CXX_EXTENSIONS OFF)
@@ -468,7 +464,6 @@
 	${CMAKE_BINARY_DIR}/scribus
 	${QT_INCLUDES}
 	${FREETYPE_INCLUDE_DIR}
-#	${FONTCONFIG_INCLUDE_DIR}
 	${JPEG_INCLUDE_DIR}
 	${LCMS2_INCLUDE_DIR}
 	${LIBXML2_INCLUDE_DIR}

Modified: trunk/Scribus/scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24859&path=/trunk/Scribus/scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/CMakeLists.txt	(original)
+++ trunk/Scribus/scribus/CMakeLists.txt	Sun Jan 30 15:40:33 2022
@@ -5,11 +5,7 @@
 	# a custom target that is always built
 
 	if (NOT CMAKE_VERSION VERSION_LESS "3.2.0")
-		if (WANT_QT6)
-			add_custom_target(svnheader ALL COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -P ${CMAKE_SOURCE_DIR}/cmake/modules/getsvn.cmake BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/svnversion.h)
-		else()
-			add_custom_target(svnheader ALL COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -P ${CMAKE_MODULE_PATH}/getsvn.cmake BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/svnversion.h)
-		endif()
+		add_custom_target(svnheader ALL COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -P ${CMAKE_SOURCE_DIR}/cmake/modules/getsvn.cmake BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/svnversion.h)
 	else ()
 		add_custom_target(svnheader ALL DEPENDS svn_header ) # svn_header is nothing more than a unique string
 		# creates svnheader.h using cmake script
@@ -765,28 +761,17 @@
 
 message("RPATH: ${CMAKE_INSTALL_RPATH}")
 
-IF(NOT WANT_QT6)
-	target_link_libraries(${EXE_NAME}
-		PUBLIC
-		${Qt5Core_LIBRARIES}
-		${Qt5Widgets_LIBRARIES}
-		${Qt5Gui_LIBRARIES}
-		${Qt5Xml_LIBRARIES}
-		${Qt5Network_LIBRARIES}
-		${Qt5OpenGL_LIBRARIES}
-		PRIVATE
-		${Qt5PrintSupport_LIBRARIES}
-	)
-else()
-	target_link_libraries(${EXE_NAME}
-		PUBLIC
-		Qt6::Core
-		Qt6::Core5Compat
-		Qt6::Gui
-		Qt6::Widgets
-		Qt6::Network
-		)
-endif()
+target_link_libraries(${EXE_NAME}
+	PUBLIC
+	Qt6::Core
+	Qt6::Core5Compat
+	Qt6::Gui
+	Qt6::Widgets
+	Qt6::Network
+	Qt6::Xml
+	Qt6::PrintSupport
+	Qt6::OpenGL
+	)
 
 target_link_libraries(${EXE_NAME}
 	PUBLIC




More information about the scribus-commit mailing list