r23020 by craig - Fix some CMakeLists enhancements

scribus-commit scribus-commit at lists.scribus.net
Tue Jun 11 20:00:05 UTC 2019


Author: craig
Date: Tue Jun 11 20:00:05 2019
New Revision: 23020

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23020
Log:
Fix some CMakeLists enhancements

Modified:
    trunk/Scribus/CMakeLists.txt
    trunk/Scribus/cmake/modules/FindLIBPODOFO.cmake
    trunk/Scribus/scribus/CMakeLists.txt

Modified: trunk/Scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23020&path=/trunk/Scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/CMakeLists.txt	(original)
+++ trunk/Scribus/CMakeLists.txt	Tue Jun 11 20:00:05 2019
@@ -162,51 +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 ON OR ARCH_X86_64 EQUAL ON))
+if ((APPLE) AND (CMAKE_SIZEOF_VOID_P EQUAL 8) AND (ARCH_X86 OR ARCH_X86_64))
 	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)
+		set(APPLE_10_15_X ON CACHE BOOL "Found macOS Catalina Target: Apple, 64 bit, X86")
 	endif()
 	if (_apple_ver EQUAL "18")
 		message(STATUS "Found macOS Mojave Target: Apple, 64 bit, X86")
-		set(APPLE_10_14_X ON CACHE TYPE BOOL)
+		set(APPLE_10_14_X ON CACHE BOOL "Found macOS Mojave Target: Apple, 64 bit, X86")
 	endif()
 	if (_apple_ver EQUAL "17")
 		message(STATUS "Found macOS High Sierra Target: Apple, 64 bit, X86")
-		set(APPLE_10_13_X ON CACHE TYPE BOOL)
+		set(APPLE_10_13_X ON CACHE BOOL "Found macOS High Sierra Target: Apple, 64 bit, X86")
 	endif()
 	if (_apple_ver EQUAL "16")
 	    message(STATUS "Found macOS Sierra Target: Apple, 64 bit, X86")
-		set(APPLE_10_12_X ON CACHE TYPE BOOL)
+		set(APPLE_10_12_X ON CACHE BOOL "Found macOS Sierra Target: Apple, 64 bit, X86")
 	endif()
 	if (_apple_ver EQUAL "15")
 		message(STATUS "Found OSX El Capitan Target: Apple, 64 bit, X86")
-		set(APPLE_10_11_X ON CACHE TYPE BOOL)
+		set(APPLE_10_11_X ON CACHE BOOL "Found OSX El Capitan Target: Apple, 64 bit, X86")
 	endif()
 	if (_apple_ver EQUAL "14")
 		message(STATUS "Found OSX Yosemite Target: Apple, 64 bit, X86")
-		set(APPLE_10_10_X ON CACHE TYPE BOOL)
+		set(APPLE_10_10_X ON CACHE BOOL "Found OSX Yosemite Target: Apple, 64 bit, X86")
 	endif()
 	if (_apple_ver EQUAL "13")
 		message(STATUS "Found OSX Mavericks Target: Apple, 64 bit, X86")
-		set(APPLE_10_9_X ON CACHE TYPE BOOL)
+		set(APPLE_10_9_X ON CACHE BOOL "Found OSX Mavericks Target: Apple, 64 bit, X86")
 	endif()
 	if (_apple_ver EQUAL "12")
 		message(STATUS "Found OSX Mountain Lion Target: Apple, 64 bit, X86")
-		set(APPLE_10_8_X ON CACHE TYPE BOOL)
+		set(APPLE_10_8_X ON CACHE BOOL "Found OSX Mountain Lion Target: Apple, 64 bit, X86")
 	endif()
 	if (_apple_ver EQUAL "11")
 		message(STATUS "Found OSX Lion Target: Apple, 64 bit, X86")
-		set(APPLE_10_7_X ON CACHE TYPE BOOL)
+		set(APPLE_10_7_X ON CACHE BOOL "Found OSX Lion Target: Apple, 64 bit, X86")
 	endif()
 	if (_apple_ver EQUAL "10")
 		message(STATUS "Found OSX Snow Leopard Target: Apple, 64 bit, X86")
-		set(APPLE_10_6_X ON CACHE TYPE BOOL)
+		set(APPLE_10_6_X ON CACHE BOOL "Found OSX Snow Leopard Target: Apple, 64 bit, X86")
 	endif()
 	if (_apple_ver EQUAL "9")
 		message(STATUS "Found OSX Leopard Target: Apple, 32 bit, X86")
-		set(APPLE_10_5_X ON CACHE TYPE BOOL)
+		set(APPLE_10_5_X ON CACHE BOOL "Found OSX Leopard Target: Apple, 32 bit, X86")
 	endif()
 	unset(ARCH_X86)
 endif()
@@ -224,12 +224,12 @@
 
 #On Apple, we ignore the versioning tag so all items are "scribus" not "scribus-version"
 if (NOT BUILD_OSX_BUNDLE)
-	set(BUILD_OSX_BUNDLE ${APPLE} CACHE TYPE BOOL)
+	set(BUILD_OSX_BUNDLE ${APPLE} CACHE BOOL)
 endif()
 
 #Simplify future conditionals for Apple
 if (APPLE AND BUILD_OSX_BUNDLE)
-	set(APPLEBUNDLE ON CACHE TYPE BOOL)
+	set(APPLEBUNDLE ON CACHE BOOL "Building Apple Bundle")
 endif()
 
 #Announce we cached a version request before, overridden below for OSX
@@ -253,9 +253,9 @@
 #Store our version string if required
 if (WANT_VERSIONING AND NOT CACHED_VERSIONING)
 	if (NOT CUSTOM_VERSIONTAG)
-		set(TAG_VERSION "-${VERSION}" CACHE TYPE STRING)
+		set(TAG_VERSION "-${VERSION}" CACHE STRING)
 	else()
-		set(TAG_VERSION ${CUSTOM_VERSIONTAG} CACHE TYPE STRING)
+		set(TAG_VERSION ${CUSTOM_VERSIONTAG} CACHE STRING)
 	endif()
 endif()
 
@@ -403,7 +403,7 @@
 	if(NOT ARCH_X86_64)
 		message(STATUS "WARNING: BUILDING 64 Bit build on non 64 bit architecture")
 	endif()
-	 set(LIB_SUFFIX "64" CACHE TYPE STRING)
+	 set(LIB_SUFFIX "64" CACHE STRING)
 endif()
 set(LIB_DIR_NAME "lib${LIB_SUFFIX}")
 if (APPLEBUNDLE)
@@ -461,7 +461,7 @@
 #Based on our build type, setup our build options
 if(APPLE)
 	if(APPLE_10_15_X)
-		set(OSXMINVER "10.15" CACHE TYPE STRING)
+		set(OSXMINVER "10.15" CACHE STRING "OSX 10.15")
 		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")
@@ -471,7 +471,7 @@
 		endif()
 	endif()
 	if(APPLE_10_14_X)
-		set(OSXMINVER "10.14" CACHE TYPE STRING)
+		set(OSXMINVER "10.14" CACHE STRING "OSX 10.14")
 		if (WANT_OSX_SDK)
 			if(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")
@@ -481,7 +481,7 @@
 		endif()
 	endif()
 	if(APPLE_10_13_X)
-		set(OSXMINVER "10.13" CACHE TYPE STRING)
+		set(OSXMINVER "10.13" CACHE STRING "OSX 10.13")
 		if (WANT_OSX_SDK)
 			if(EXISTS("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk"))
 				set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk")
@@ -491,7 +491,7 @@
 		endif()
 	endif()
 	if(APPLE_10_12_X)
-	    set(OSXMINVER "10.12" CACHE TYPE STRING)
+		set(OSXMINVER "10.12" CACHE STRING "OSX 10.12")
 		if (WANT_OSX_SDK)
 		    if(EXISTS("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk"))
 			    set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk")
@@ -501,13 +501,13 @@
 		endif()
 	endif()
 	if(APPLE_10_11_X)
-		set(OSXMINVER "10.11" CACHE TYPE STRING)
+		set(OSXMINVER "10.11" CACHE STRING "OSX 10.11")
 		if (WANT_OSX_SDK)
 			set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.11.sdk")
 		endif()
 	endif()
 	if(APPLE_10_10_X)
-		set(OSXMINVER "10.10" CACHE TYPE STRING)
+		set(OSXMINVER "10.10" CACHE STRING "OSX 10.10")
 		set(CMAKE_OSX_DEPLOYMENT_TARGET "10.10")
 		if (WANT_OSX_SDK)
 			if(EXISTS("/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk"))
@@ -518,37 +518,37 @@
 		endif()
 	endif()
 	if(APPLE_10_9_X)
-		set(OSXMINVER "10.9" CACHE TYPE STRING)
+		set(OSXMINVER "10.9" CACHE STRING "OSX 10.9")
 		if (WANT_OSX_SDK)
 			set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk")
 		endif()
 	endif()
 	if(APPLE_10_8_X)
-		set(OSXMINVER "10.8" CACHE TYPE STRING)
+		set(OSXMINVER "10.8" CACHE STRING "OSX 10.8")
 		if (WANT_OSX_SDK)
 			set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk")
 		endif()
 	endif()
 	if(APPLE_10_7_X)
-		set(OSXMINVER "10.7" CACHE TYPE STRING)
+		set(OSXMINVER "10.7" CACHE STRING "OSX 10.7")
 		if (WANT_OSX_SDK)
 			set(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk")
 		endif()
 	endif()
 	if(APPLE_10_6_X)
-		set(OSXMINVER "10.6" CACHE TYPE STRING)
+		set(OSXMINVER "10.6" CACHE STRING "OSX 10.6")
 		if (WANT_OSX_SDK)
 			set(CMAKE_OSX_SYSROOT "/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk")
 		endif()
 	endif()
 	if(APPLE_10_5_X)
-		set(OSXMINVER "10.5" CACHE TYPE STRING)
+		set(OSXMINVER "10.5" CACHE STRING "OSX 10.5")
 		if (WANT_OSX_SDK)
 			set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.5.sdk")
 		endif()
 	endif()
 	if(APPLE_10_4_X)
-		set(OSXMINVER "10.4" CACHE TYPE STRING)
+		set(OSXMINVER "10.4" CACHE STRING "OSX 10.4")
 		if (WANT_OSX_SDK)
 			set(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.4u.sdk")
 		endif()
@@ -823,7 +823,7 @@
 find_package(CAIRO REQUIRED)
 if(CAIRO_FOUND)
 	message("CAIRO Library Found OK")
-	set(RENDER_LIB "CAIRO_SYSTEM" CACHE TYPE STRING)
+	set(RENDER_LIB "CAIRO_SYSTEM" CACHE STRING "Set render library to cairo")
 else()
 	message(FATAL_ERROR "No Cairo Found")
 endif()

Modified: trunk/Scribus/cmake/modules/FindLIBPODOFO.cmake
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23020&path=/trunk/Scribus/cmake/modules/FindLIBPODOFO.cmake
==============================================================================
--- trunk/Scribus/cmake/modules/FindLIBPODOFO.cmake	(original)
+++ trunk/Scribus/cmake/modules/FindLIBPODOFO.cmake	Tue Jun 11 20:00:05 2019
@@ -50,14 +50,14 @@
 		find_package(OpenSSL)
 		if (OPENSSL_FOUND)
 			message("OpenSSL found OK for installed version of PoDoFo (>= 0.9.5) - Enabling support for PDF embedded in AI")
-			set(LIBPODOFO_FOUND TRUE CACHE BOOLEAN "Was libpodofo found")
+			set(LIBPODOFO_FOUND ON CACHE BOOL "Was libpodofo found")
 		else()
 			message("OpenSSL NOT found for installed version of PoDoFo (>= 0.9.5) - Disabling support for PDF embedded in AI")
 			unset(LIBPODOFO_FOUND)
 		endif()
 	else()
 		message("OpenSSL NOT required for installed version of PoDoFo (< 0.9.5) - Enabling support for PDF embedded in AI")
-		set(LIBPODOFO_FOUND TRUE CACHE BOOLEAN "Was libpodofo found")
+		set(LIBPODOFO_FOUND TRUE CACHE BOOL "Was libpodofo found")
 	endif()
 endif(LIBPODOFO_INCLUDE_DIR AND LIBPODOFO_LIBRARY)
 

Modified: trunk/Scribus/scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23020&path=/trunk/Scribus/scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/CMakeLists.txt	(original)
+++ trunk/Scribus/scribus/CMakeLists.txt	Tue Jun 11 20:00:05 2019
@@ -1190,9 +1190,9 @@
 endif()
 
 if(APPLEBUNDLE)
-	set(EXE_NAME "Scribus${TAG_VERSION}" CACHE TYPE STRING)
+	set(EXE_NAME "Scribus${TAG_VERSION}" CACHE STRING "Scribus version")
 else()
-	set(EXE_NAME "scribus${TAG_VERSION}" CACHE TYPE STRING)
+	set(EXE_NAME "scribus${TAG_VERSION}" CACHE STRING "Scribus version")
 endif()
 
 if(COMMAND cmake_policy)




More information about the scribus-commit mailing list