r23013 by craig - Update CMakeLists for syntax and OSX 10.15

scribus-commit scribus-commit at lists.scribus.net
Mon Jun 10 15:19:44 UTC 2019


Author: craig
Date: Mon Jun 10 15:19:44 2019
New Revision: 23013

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23013
Log:
Update CMakeLists for syntax and OSX 10.15

Modified:
    trunk/Scribus/CMakeLists.txt

Modified: trunk/Scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23013&path=/trunk/Scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/CMakeLists.txt	(original)
+++ trunk/Scribus/CMakeLists.txt	Mon Jun 10 15:19:44 2019
@@ -23,7 +23,7 @@
 #Don't force verbose
 set(CMAKE_VERBOSE_MAKEFILE OFF)
 #Include current dir
-set(CMAKE_INCLUDE_CURRENT_DIR TRUE)
+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)
@@ -97,62 +97,62 @@
 string(REGEX MATCH "(i[0-9]86-*)|(athlon-*)|(pentium-*)" _machine_x86 "${MACHINE}")
 if (_machine_x86)
 	message(STATUS "Found target X86")
-	set(ARCH_X86 1)
+	set(ARCH_X86 ON)
 endif()
 
 string(REGEX MATCH "(x86_64-*)|(X86_64-*)|(AMD64-*)|(amd64-*)" _machine_x86_64 "${MACHINE}")
 if (_machine_x86_64)
 	message(STATUS "Found target X86_64")
-	set(ARCH_X86_64 1)
+	set(ARCH_X86_64 ON)
 endif()
 
 string(REGEX MATCH "(sparc64-*)|(SPARC64-*)" _machine_sparc_64 "${MACHINE}")
 if (_machine_sparc_64)
 	message(STATUS "Found target SPARC 64")
-	set(ARCH_SPARC_64 1)
+	set(ARCH_SPARC_64 ON)
 endif()
 
 string(REGEX MATCH "(mips64-*)|(MIPS64-*)" _machine_mips_64 "${MACHINE}")
 if (_machine_mips_64)
 	message(STATUS "Found target MIPS 64")
-	set(ARCH_MIPS_64 1)
+	set(ARCH_MIPS_64 ON)
 endif()
 
 string(REGEX MATCH "(ppc-*)|(powerpc-*)" _machine_ppc "${MACHINE}")
 if (_machine_ppc)
 	message(STATUS "Found target PPC")
-	set(ARCH_PPC 1)
+	set(ARCH_PPC ON)
 endif()
 
 string(REGEX MATCH "(ppc64-*)|(PPC64-*)|(powerpc64-*)" _machine_ppc_64 "${MACHINE}")
 if (_machine_ppc_64)
 	message(STATUS "Found target PPC64")
-	set(ARCH_PPC_64 1)
+	set(ARCH_PPC_64 ON)
 endif()
 
 string(REGEX MATCH "(sparc-*)" _machine_sparc "${MACHINE}")
 if (_machine_sparc)
 	message(STATUS "Found target Sparc")
-	set(ARCH_SPARC 1)
+	set(ARCH_SPARC ON)
 endif()
 
 string(REGEX MATCH "(sparcv9-*)" _machine_sparcv9 "${MACHINE}")
 if (_machine_sparcv9)
 	message(STATUS "Found target Sparc v9")
-	set(ARCH_SPARCV9 1)
+	set(ARCH_SPARCV9 ON)
 endif()
 
 string(REGEX MATCH "(sparc64-*)" _machine_sparc64 "${MACHINE}")
 if (_machine_sparc64)
 	message(STATUS "Found target Sparc64")
-	set(ARCH_SPARC64 1)
-	set(ARCH64BIT 1)
+	set(ARCH_SPARC64 ON)
+	set(ARCH64BIT ON)
 endif()
 
 string(REGEX MATCH "(hppa*)" _machine_hppa "${MACHINE}")
 if (_machine_hppa)
 	message(STATUS "Found target Hppa")
-	set(ARCH_HPPA 1)
+	set(ARCH_HPPA ON)
 endif()
 
 # We need to pass -fPIC to lib2geom on amd64, mips, mipsel, and hppa. See:
@@ -162,47 +162,51 @@
 set(CMAKE_POSITION_INDEPENDENT_CODE ON)
 
 ## Do our Apple OSX version setup
-if (APPLE AND CMAKE_SIZEOF_VOID_P EQUAL 8 AND (ARCH_X86 EQUAL 1 OR ARCH_X86_64 EQUAL 1))
+if (APPLE AND CMAKE_SIZEOF_VOID_P EQUAL 8 AND (ARCH_X86 EQUAL ON OR ARCH_X86_64 EQUAL ON))
 	string(REGEX REPLACE ".*-darwin([0-9]+).*" "\\1" _apple_ver "${MACHINE}")
+	if (_apple_ver EQUAL "19")
+		message(STATUS "Found macOS Catalina Target: Apple, 64 bit, X86")
+		set(APPLE_10_15_X ON CACHE TYPE BOOL)
+	endif()
 	if (_apple_ver EQUAL "18")
 		message(STATUS "Found macOS Mojave Target: Apple, 64 bit, X86")
-		set(APPLE_10_14_X 1 CACHE TYPE BOOL)
+		set(APPLE_10_14_X ON CACHE TYPE BOOL)
 	endif()
 	if (_apple_ver EQUAL "17")
 		message(STATUS "Found macOS High Sierra Target: Apple, 64 bit, X86")
-		set(APPLE_10_13_X 1 CACHE TYPE BOOL)
+		set(APPLE_10_13_X ON CACHE TYPE BOOL)
 	endif()
 	if (_apple_ver EQUAL "16")
 	    message(STATUS "Found macOS Sierra Target: Apple, 64 bit, X86")
-		set(APPLE_10_12_X 1 CACHE TYPE BOOL)
+		set(APPLE_10_12_X ON CACHE TYPE BOOL)
 	endif()
 	if (_apple_ver EQUAL "15")
 		message(STATUS "Found OSX El Capitan Target: Apple, 64 bit, X86")
-		set(APPLE_10_11_X 1 CACHE TYPE BOOL)
+		set(APPLE_10_11_X ON CACHE TYPE BOOL)
 	endif()
 	if (_apple_ver EQUAL "14")
 		message(STATUS "Found OSX Yosemite Target: Apple, 64 bit, X86")
-		set(APPLE_10_10_X 1 CACHE TYPE BOOL)
+		set(APPLE_10_10_X ON CACHE TYPE BOOL)
 	endif()
 	if (_apple_ver EQUAL "13")
 		message(STATUS "Found OSX Mavericks Target: Apple, 64 bit, X86")
-		set(APPLE_10_9_X 1 CACHE TYPE BOOL)
+		set(APPLE_10_9_X ON CACHE TYPE BOOL)
 	endif()
 	if (_apple_ver EQUAL "12")
 		message(STATUS "Found OSX Mountain Lion Target: Apple, 64 bit, X86")
-		set(APPLE_10_8_X 1 CACHE TYPE BOOL)
+		set(APPLE_10_8_X ON CACHE TYPE BOOL)
 	endif()
 	if (_apple_ver EQUAL "11")
 		message(STATUS "Found OSX Lion Target: Apple, 64 bit, X86")
-		set(APPLE_10_7_X 1 CACHE TYPE BOOL)
+		set(APPLE_10_7_X ON CACHE TYPE BOOL)
 	endif()
 	if (_apple_ver EQUAL "10")
 		message(STATUS "Found OSX Snow Leopard Target: Apple, 64 bit, X86")
-		set(APPLE_10_6_X 1 CACHE TYPE BOOL)
+		set(APPLE_10_6_X ON CACHE TYPE BOOL)
 	endif()
 	if (_apple_ver EQUAL "9")
 		message(STATUS "Found OSX Leopard Target: Apple, 32 bit, X86")
-		set(APPLE_10_5_X 1 CACHE TYPE BOOL)
+		set(APPLE_10_5_X ON CACHE TYPE BOOL)
 	endif()
 	unset(ARCH_X86)
 endif()
@@ -210,7 +214,7 @@
 
 #convert any 64 bit build into generic 64 tag for below
 if (ARCH_X86_64 OR ARCH_SPARC_64 OR ARCH_MIPS_64 OR ARCH_PPC_64)
-	set(ARCH64BIT 1)
+	set(ARCH64BIT ON)
 endif()
 
 message(STATUS "Building for target ${MACHINE}")
@@ -225,7 +229,7 @@
 
 #Simplify future conditionals for Apple
 if (APPLE AND BUILD_OSX_BUNDLE)
-	set(APPLEBUNDLE TRUE CACHE TYPE BOOL)
+	set(APPLEBUNDLE ON CACHE TYPE BOOL)
 endif()
 
 #Announce we cached a version request before, overridden below for OSX
@@ -233,16 +237,16 @@
 	if (NOT APPLEBUNDLE)
 		message(STATUS "Previously selected version tag: ${TAG_VERSION}")
 	endif()
-	set(WANT_VERSIONING 1)
-	set(CACHED_VERSIONING 1)
+	set(WANT_VERSIONING ON)
+	set(CACHED_VERSIONING ON)
 endif()
 
 #Remove version tags on OSX so our bundle is Scribus.app
 if (APPLEBUNDLE OR WIN32)
 	if (WANT_VERSIONING OR CACHED_VERSIONING)
 		message(STATUS "Ignoring version tag on Win32 or OSX when building bundle")
-		set(WANT_VERSIONING 0)
-		set(CACHED_VERSIONING 0)
+		set(WANT_VERSIONING OFF)
+		set(CACHED_VERSIONING OFF)
 	endif()
 endif()
 
@@ -441,7 +445,7 @@
 
 #Convert our simpler command line option to the CMake style
 #None, Debug, Release, .. or custom ones
-# set(WANT_DEBUG 1)
+# set(WANT_DEBUG ON)
 if(WANT_DEBUG)
 	set(CMAKE_BUILD_TYPE Debug)
 endif()
@@ -456,6 +460,16 @@
 
 #Based on our build type, setup our build options
 if(APPLE)
+	if(APPLE_10_15_X)
+		set(OSXMINVER "10.15" CACHE TYPE STRING)
+		if (WANT_OSX_SDK)
+			if(EXISTS("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk"))
+				set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk")
+			elseif(EXISTS("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk"))
+				set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk")
+			endif()
+		endif()
+	endif()
 	if(APPLE_10_14_X)
 		set(OSXMINVER "10.14" CACHE TYPE STRING)
 		if (WANT_OSX_SDK)
@@ -556,7 +570,7 @@
 			if (WANT_OSX_SDK)
 				set(CMAKE_OSX_DEPLOYMENT_TARGET "${OSXMINVER}")
 			endif()
-			if(APPLE_10_6_X OR APPLE_10_7_X OR APPLE_10_8_X OR APPLE_10_9_X OR APPLE_10_10_X OR APPLE_10_11_X OR APPLE_10_12_X OR APPLE_10_13_X OR APPLE_10_14_X)
+			if(APPLE_10_6_X OR APPLE_10_7_X OR APPLE_10_8_X OR APPLE_10_9_X OR APPLE_10_10_X OR APPLE_10_11_X OR APPLE_10_12_X OR APPLE_10_13_X OR APPLE_10_14_X OR APPLE_10_15_X)
 				message("Setting x86_64 Architecture for OSX Build/Bundle")
 				set(CMAKE_OSX_ARCHITECTURES "x86_64" )
 				set(CMAKE_TRY_COMPILE_OSX_ARCHITECTURES "x86_64" )
@@ -616,8 +630,8 @@
 					-D_USE_MATH_DEFINES
 					-DCOMPILE_PLUGIN_AS_DLL
 					)
-	set(BUILD_WINDOWS_VERSION 1)
-	set(DLL_USE_NATIVE_API 1)
+	set(BUILD_WINDOWS_VERSION ON)
+	set(DLL_USE_NATIVE_API ON)
 endif()
 
 ##############################################################################################################
@@ -701,7 +715,7 @@
 message(STATUS "Qt VERSION: ${Qt5Widgets_VERSION}")
 #if (NOT WANT_CPP11 AND Qt5Widgets_VERSION_MAJOR EQUAL 5 AND Qt5Widgets_VERSION_MINOR GREATER 6)
 #	message(STATUS "Your Qt version is 5.7.0 or superior, enabling C++11 compiler features")
-#	set(WANT_CPP11 1)
+#	set(WANT_CPP11 ON)
 #endif()
 #>> Qt
 
@@ -712,11 +726,11 @@
 	message(STATUS "Enabling C++11 compiler features")
 	set(CMAKE_CXX_STANDARD 11)
 #endif()
-if(WANT_CPP14)
+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")
+		message(STATUS "Enabling C++17 compiler features")
 		set(CMAKE_CXX_STANDARD 17)
 endif()
 
@@ -731,7 +745,7 @@
 find_package(ZLIB REQUIRED)
 if (ZLIB_FOUND)
 	message("ZLIB Library Found OK")
-	set(HAVE_LIBZ 1)
+	set(HAVE_LIBZ ON)
 endif()
 #find_package(PNG REQUIRED)
 #if (PNG_FOUND)
@@ -745,7 +759,7 @@
 	find_package(OSG)
 	if(OSG_FOUND)
 		message("OSG found OK")
-		set(HAVE_OSG 1)
+		set(HAVE_OSG ON)
 		find_package(OpenGL)
 		include(CheckFunctionExists)
 		CHECK_FUNCTION_EXISTS(memrchr HAVE_MEMRCHR)
@@ -762,7 +776,7 @@
 find_package(TIFF REQUIRED)
 if (TIFF_FOUND)
 	message("TIFF Library Found OK")
-	set(HAVE_TIFF 1)
+	set(HAVE_TIFF ON)
 else()
 	message(FATAL_ERROR "Could not find the TIFF Library")
 endif()
@@ -773,8 +787,8 @@
 find_package(PythonLibs 2 REQUIRED)
 if (PYTHON_LIBRARY)
 	message("Python Library Found OK")
-	set(HAVE_PYTHON 1)
-	set(COMPILE_PYTHON 1)
+	set(HAVE_PYTHON ON)
+	set(COMPILE_PYTHON ON)
 endif()
 #>> PYTHON
 
@@ -819,7 +833,7 @@
 if(NOT WIN32 AND NOT HAIKU)
 	find_package(Cups REQUIRED)
 	if(CUPS_FOUND)
-		set(HAVE_CUPS 1)
+		set(HAVE_CUPS ON)
 		message("CUPS Library Found OK")
 	endif()
 else()
@@ -831,7 +845,7 @@
 #<<LibXML2
 find_package(LibXml2 REQUIRED)
 if(LIBXML2_FOUND)
-	set(HAVE_XML 1)
+	set(HAVE_XML ON)
 	message("LIBXML2 Library Found OK")
 endif()
 #>>LibXML2
@@ -840,8 +854,8 @@
 set(LCMS_DIR ${CMAKE_MODULE_PATH})
 find_package(LCMS2 REQUIRED)
 if(LCMS2_FOUND)
-	set(HAVE_LCMS2 1)
-	set(HAVE_CMS 1)
+	set(HAVE_LCMS2 ON)
+	set(HAVE_CMS ON)
 	set(CMS_INC "\"lcms2.h\"")
 	message("LittleCMS-2 Library Found OK")
 else()
@@ -855,7 +869,7 @@
 	find_package(FONTCONFIG)
 	if(FONTCONFIG_FOUND)
 		message("FontConfig Found OK")
-		set(HAVE_FONTCONFIG 1)
+		set(HAVE_FONTCONFIG ON)
 	endif()
 else()
 	# Windows builds neither use nor require fontconfig
@@ -869,7 +883,7 @@
 	find_package(HUNSPELL)
 	if (HUNSPELL_FOUND)
 		message("Hunspell Found OK")
-		set(HAVE_HUNSPELL 1)
+		set(HAVE_HUNSPELL ON)
 	else()
 		message("Hunspell or its developer libraries NOT found - Disabling support for spell checking")
 	endif()
@@ -882,7 +896,7 @@
 	find_package(LIBPODOFO)
 	if (LIBPODOFO_FOUND)
 		message("PoDoFo found OK")
-		set(HAVE_PODOFO 1)
+		set(HAVE_PODOFO ON)
 	else()
 		message("PoDoFo NOT found - Disabling support for PDF embedded in AI")
 	endif()
@@ -895,7 +909,7 @@
 	find_package(Boost)
 	if (Boost_FOUND)
 		message("Boost Library Found OK")
-		set(HAVE_BOOST 1)
+		set(HAVE_BOOST ON)
 	else()
 		message("Boost: NOT FOUND, not building 2geomtools")
 	endif()
@@ -920,7 +934,7 @@
 #<<Poppler for PDF import
 find_package(POPPLER REQUIRED)
 if (POPPLER_FOUND)
-	set( HAVE_POPPLER 1 )
+	set(HAVE_POPPLER ON)
 	message(STATUS "Found poppler")
 	message(STATUS "Found poppler libs: ${POPPLER_LIBRARY}")
 	message(STATUS "Found poppler includes: ${POPPLER_INCLUDE_DIR}")
@@ -936,7 +950,7 @@
 	if (LIBREVENGE_STREAM_FOUND)
 		pkg_check_modules(LIBREVENGE_GENERATORS librevenge-generators-0.0)
 		if (LIBREVENGE_GENERATORS_FOUND)
-			set(HAVE_REVENGE 1)
+			set(HAVE_REVENGE ON)
 		endif()
 	endif()
 endif()




More information about the scribus-commit mailing list