r19720 by craig - Update 14x to the same bundle path structure as 15x

scribus-commit scribus-commit at lists.scribus.net
Fri Jan 2 17:58:32 UTC 2015


Author: craig
Date: Fri Jan  2 17:58:31 2015
New Revision: 19720

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19720
Log:
Update 14x to the same bundle path structure as 15x

Modified:
    branches/Version14x/Scribus/CMakeLists.txt
    branches/Version14x/Scribus/scribus/scpaths.cpp

Modified: branches/Version14x/Scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19720&path=/branches/Version14x/Scribus/CMakeLists.txt
==============================================================================
--- branches/Version14x/Scribus/CMakeLists.txt (original)
+++ branches/Version14x/Scribus/CMakeLists.txt Fri Jan  2 17:58:31 2015
@@ -108,23 +108,46 @@
 )
 
 MESSAGE(STATUS  "Machine: ${MACHINE}, void pointer size: ${CMAKE_SIZEOF_VOID_P}")
-STRING(REGEX MATCH "(i?86-*)|(athlon-*)|(pentium-*)" _machine_x86 "${MACHINE}")
+STRING(REGEX MATCH "(i[0-9]86-*)|(athlon-*)|(pentium-*)" _machine_x86 "${MACHINE}")
 IF (_machine_x86)
     MESSAGE(STATUS "Found target X86")
     SET(ARCH_X86 1)
 ENDIF (_machine_x86)
-IF (APPLE AND CMAKE_SIZEOF_VOID_P EQUAL 8 AND ARCH_X86 EQUAL 1)
-  MESSAGE(STATUS "Found Snow Leopard Target: Apple, 64 bit, X86")
-  UNSET(ARCH_X86)
-  SET(ARCH_X86_64 1)
-  SET(APPLE_10_6_X 1 CACHE TYPE BOOL)
-ENDIF (APPLE AND CMAKE_SIZEOF_VOID_P EQUAL 8 AND ARCH_X86 EQUAL 1)
 
 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)
 ENDIF (_machine_x86_64)
+
+IF (APPLE AND CMAKE_SIZEOF_VOID_P EQUAL 8 AND (ARCH_X86 EQUAL 1 OR ARCH_X86_64 EQUAL 1))
+	STRING(REGEX REPLACE ".*-darwin([0-9]+).*" "\\1" _apple_ver "${MACHINE}")
+	IF (_apple_ver EQUAL "14")
+		MESSAGE(STATUS "Found OSX Yosemite Target: Apple, 64 bit, X86")
+		SET(APPLE_10_10_X 1 CACHE TYPE BOOL)
+	ENDIF (_apple_ver EQUAL "14")
+	IF (_apple_ver EQUAL "13")
+		MESSAGE(STATUS "Found OSX Mavericks Target: Apple, 64 bit, X86")
+		SET(APPLE_10_9_X 1 CACHE TYPE BOOL)
+	ENDIF (_apple_ver EQUAL "13")
+	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)
+	ENDIF (_apple_ver EQUAL "12")
+	IF (_apple_ver EQUAL "11")
+		MESSAGE(STATUS "Found OSX Lion Target: Apple, 64 bit, X86")
+		SET(APPLE_10_7_X 1 CACHE TYPE BOOL)
+	ENDIF (_apple_ver EQUAL "11")
+	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)
+	ENDIF (_apple_ver EQUAL "10")
+	IF (_apple_ver EQUAL "9")
+		MESSAGE(STATUS "Found OSX Leopard Target: Apple, 32 bit, X86")
+		SET(APPLE_10_5_X 1 CACHE TYPE BOOL)
+	ENDIF (_apple_ver EQUAL "9")
+	UNSET(ARCH_X86)
+ENDIF (APPLE AND CMAKE_SIZEOF_VOID_P EQUAL 8 AND (ARCH_X86 EQUAL 1 OR ARCH_X86_64 EQUAL 1))
 
 STRING(REGEX MATCH "(sparc64-*)|(SPARC64-*)" _machine_sparc_64 "${MACHINE}")
 IF (_machine_sparc_64)
@@ -322,15 +345,22 @@
   ENDIF(NOT ARCH_X86_64)
   SET(LIB_SUFFIX "64" CACHE TYPE STRING)
 ENDIF(WANT_LIB64)
-SET(LIB_DIR_NAME "lib${LIB_SUFFIX}")
-SET(LIBDIR "${LIB_DIR_NAME}/${MAIN_DIR_NAME}${TAG_VERSION}/")
+IF (APPLEBUNDLE)
+  SET(LIBDIR "lib/")
+ELSE (APPLEBUNDLE)
+  SET(LIBDIR "${LIB_DIR_NAME}/${MAIN_DIR_NAME}${TAG_VERSION}/")
+ENDIF (APPLEBUNDLE)
 ADD_DEFINITIONS("-DLIBDIR=\\\"${CMAKE_INSTALL_PREFIX}/${LIBDIR}\\\"")
 
 #PLUGINS
 IF(WIN32)
   SET(PLUGINDIR "plugins")
 ELSE(WIN32)
-  SET(PLUGINDIR "${LIB_DIR_NAME}/${MAIN_DIR_NAME}${TAG_VERSION}/plugins/")
+  IF (APPLEBUNDLE)
+    SET(PLUGINDIR "${LIBDIR}")
+  ELSE (APPLEBUNDLE)
+    SET(PLUGINDIR "${LIB_DIR_NAME}/${MAIN_DIR_NAME}${TAG_VERSION}/plugins/")
+  ENDIF (APPLEBUNDLE)
 ENDIF(WIN32)
 ADD_DEFINITIONS("-DPLUGINDIR=\\\"${CMAKE_INSTALL_PREFIX}/${PLUGINDIR}\\\"")
 
@@ -369,54 +399,92 @@
 
 #Based on our build type, setup our build options
 IF(APPLE)
-  IF(APPLE_10_6_X)
-    SET(OSXMINVER "10.6" CACHE TYPE STRING)
-  ELSE(APPLE_10_6_X)
-    SET(OSXMINVER "10.4" CACHE TYPE STRING)
-  ENDIF(APPLE_10_6_X)
-  # gcc/mac
-  IF(WANT_UNIVERSAL_BUNDLE)
-    MESSAGE("Setting Universal (PPC/i386) Architecture for OSX Build/Bundle")
-    SET(CMAKE_OSX_ARCHITECTURES "ppc;i386" )
-    SET(CMAKE_TRY_COMPILE_OSX_ARCHITECTURES "ppc;i386" )
-    SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.4")
-    SET(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.4u.sdk")
-  ELSE(WANT_UNIVERSAL_BUNDLE)
-    IF(ARCH_PPC OR ARCH_PPC_64)
-      MESSAGE("Setting PPC Architecture for OSX Build/Bundle")
-      SET(CMAKE_OSX_ARCHITECTURES "ppc" )
-      SET(CMAKE_TRY_COMPILE_OSX_ARCHITECTURES "ppc" )
-    ELSE(ARCH_PPC OR ARCH_PPC_64)
-      IF(APPLE_10_6_X)
-        MESSAGE("Setting x86_64 Architecture for OSX Build/Bundle")
-        SET(CMAKE_OSX_ARCHITECTURES "x86_64" )
-        SET(CMAKE_TRY_COMPILE_OSX_ARCHITECTURES "x86_64" )
-#        SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.6")
-      ELSE(APPLE_10_6_X)
-        MESSAGE("Setting i386 Architecture for OSX Build/Bundle")
-        SET(CMAKE_OSX_ARCHITECTURES "i386" )
-        SET(CMAKE_TRY_COMPILE_OSX_ARCHITECTURES "i386" )
-#        SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.4")
-      ENDIF(APPLE_10_6_X)
-    ENDIF(ARCH_PPC OR ARCH_PPC_64)
-  ENDIF(WANT_UNIVERSAL_BUNDLE)
-  MESSAGE(STATUS "${CMAKE_OSX_ARCHITECTURES} ${CMAKE_OSX_SYSROOT}")
-  MESSAGE(STATUS "OSX Minimum Version: ${OSXMINVER}")
-  SET(ENV{MACOSX_DEPLOYMENT_TARGET} ${OSXMINVER} )
-  SET( ENV{LD_PREBIND} 1 )
-  SET( ENV{LD_PREBIND_ALLOW_OVERLAP} 1 )
-  IF (WANT_DEBUG)
-	SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
-	SET(CMAKE_C_FLAGS_DEBUG "-O0 -g3 -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
-  ENDIF (WANT_DEBUG)
-  IF (WANT_RELEASEWITHDEBUG)
-    SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g3 -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
-    SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g3 -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_C_FLAGS_RELEASE "-O2 -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
-  ENDIF (NOT WANT_DEBUG AND NOT WANT_RELEASEWITHDEBUG)
+	IF(APPLE_10_10_X)
+		SET(OSXMINVER "10.10" CACHE TYPE STRING)
+		IF (WANT_OSX_SDK)
+			SET(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk")
+		ENDIF (WANT_OSX_SDK)
+	ENDIF(APPLE_10_10_X)
+	IF(APPLE_10_9_X)
+		SET(OSXMINVER "10.9" CACHE TYPE STRING)
+		IF (WANT_OSX_SDK)
+			SET(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.9.sdk")
+		ENDIF (WANT_OSX_SDK)
+	ENDIF(APPLE_10_9_X)
+	IF(APPLE_10_8_X)
+		SET(OSXMINVER "10.8" CACHE TYPE STRING)
+		IF (WANT_OSX_SDK)
+			SET(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk")
+		ENDIF (WANT_OSX_SDK)
+	ENDIF(APPLE_10_8_X)
+	IF(APPLE_10_7_X)
+		SET(OSXMINVER "10.7" CACHE TYPE STRING)
+		IF (WANT_OSX_SDK)
+			SET(CMAKE_OSX_SYSROOT "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk")
+		ENDIF (WANT_OSX_SDK)
+	ENDIF(APPLE_10_7_X)
+	IF(APPLE_10_6_X)
+		SET(OSXMINVER "10.6" CACHE TYPE STRING)
+		IF (WANT_OSX_SDK)
+			SET(CMAKE_OSX_SYSROOT "/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.6.sdk")
+		ENDIF (WANT_OSX_SDK)
+	ENDIF(APPLE_10_6_X)
+	IF(APPLE_10_5_X)
+		SET(OSXMINVER "10.5" CACHE TYPE STRING)
+		IF (WANT_OSX_SDK)
+			SET(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.5.sdk")
+		ENDIF (WANT_OSX_SDK)
+	ENDIF(APPLE_10_5_X)
+	IF(APPLE_10_4_X)
+		SET(OSXMINVER "10.4" CACHE TYPE STRING)
+		IF (WANT_OSX_SDK)
+			SET(CMAKE_OSX_SYSROOT "/Developer/SDKs/MacOSX10.4u.sdk")
+		ENDIF (WANT_OSX_SDK)
+	ENDIF(APPLE_10_4_X)
+	# gcc/mac
+	IF(WANT_UNIVERSAL_BUNDLE)
+		MESSAGE("Setting Universal (PPC/i386) Architecture for OSX Build/Bundle")
+		SET(CMAKE_OSX_ARCHITECTURES "ppc;i386" )
+		SET(CMAKE_TRY_COMPILE_OSX_ARCHITECTURES "ppc;i386" )
+		IF (WANT_OSX_SDK)
+			SET(CMAKE_OSX_DEPLOYMENT_TARGET "10.4")
+		ENDIF (WANT_OSX_SDK)
+	ELSE(WANT_UNIVERSAL_BUNDLE)
+		IF(ARCH_PPC OR ARCH_PPC_64)
+			MESSAGE("Setting PPC Architecture for OSX Build/Bundle")
+			SET(CMAKE_OSX_ARCHITECTURES "ppc" )
+			SET(CMAKE_TRY_COMPILE_OSX_ARCHITECTURES "ppc" )
+		ELSE(ARCH_PPC OR ARCH_PPC_64)
+			IF (WANT_OSX_SDK)
+				SET(CMAKE_OSX_DEPLOYMENT_TARGET "${OSXMINVER}")
+			ENDIF (WANT_OSX_SDK)
+			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)
+				MESSAGE("Setting x86_64 Architecture for OSX Build/Bundle")
+				SET(CMAKE_OSX_ARCHITECTURES "x86_64" )
+				SET(CMAKE_TRY_COMPILE_OSX_ARCHITECTURES "x86_64" )
+			ELSE(APPLE_10_6_X OR APPLE_10_7_X OR APPLE_10_8_X OR APPLE_10_9_X OR APPLE_10_10_X)
+				MESSAGE("Setting i386 Architecture for OSX Build/Bundle")
+				SET(CMAKE_OSX_ARCHITECTURES "i386" )
+				SET(CMAKE_TRY_COMPILE_OSX_ARCHITECTURES "i386" )
+			ENDIF(APPLE_10_6_X OR APPLE_10_7_X OR APPLE_10_8_X OR APPLE_10_9_X OR APPLE_10_10_X)
+		ENDIF(ARCH_PPC OR ARCH_PPC_64)
+	ENDIF(WANT_UNIVERSAL_BUNDLE)
+	MESSAGE(STATUS "${CMAKE_OSX_ARCHITECTURES} ${CMAKE_OSX_SYSROOT}")
+	SET(ENV{MACOSX_DEPLOYMENT_TARGET} ${OSXMINVER} )
+	SET(ENV{LD_PREBIND} 1 )
+	SET(ENV{LD_PREBIND_ALLOW_OVERLAP} 1 )
+	IF (WANT_DEBUG)
+		SET(CMAKE_CXX_FLAGS_DEBUG "-O0 -g3 -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
+		SET(CMAKE_C_FLAGS_DEBUG "-O0 -g3 -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
+	ENDIF (WANT_DEBUG)
+	IF (WANT_RELEASEWITHDEBUG)
+		SET(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g3 -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
+		SET(CMAKE_C_FLAGS_RELWITHDEBINFO "-O2 -g3 -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_C_FLAGS_RELEASE "-O2 -fno-inline-functions -Wall -mmacosx-version-min=${OSXMINVER}")
+	ENDIF (NOT WANT_DEBUG AND NOT WANT_RELEASEWITHDEBUG)
 ELSE(APPLE)
   IF(${CMAKE_GENERATOR} MATCHES "^(Visual Studio|NMake).*")
     # Windows build with Visual Studio
@@ -547,7 +615,7 @@
 IF (${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION} LESS 2.6)
   SET(FREETYPE_DIR ${CMAKE_MODULE_PATH})
   FIND_PACKAGE(FREETYPE REQUIRED)
-  IF (FREETYPE_FOUND)
+  IF(FREETYPE_FOUND)
     MESSAGE("FreeType2 Library Found OK")
     INCLUDE(CheckLibraryExists)
     CHECK_LIBRARY_EXISTS(${FREETYPE_LIBRARY} FT_Get_First_Char "" HAVE_FREETYPE_FIRST)

Modified: branches/Version14x/Scribus/scribus/scpaths.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19720&path=/branches/Version14x/Scribus/scribus/scpaths.cpp
==============================================================================
--- branches/Version14x/Scribus/scribus/scpaths.cpp (original)
+++ branches/Version14x/Scribus/scribus/scpaths.cpp Fri Jan  2 17:58:31 2015
@@ -99,10 +99,10 @@
 	m_sampleScriptDir = QString("%1/Contents/share/scribus/samples/").arg(pathPtr);
 	m_scriptDir = QString("%1/Contents/share/scribus/scripts/").arg(pathPtr);
 	m_templateDir = QString("%1/Contents/share/scribus/templates/").arg(pathPtr);
-	m_libDir = QString("%1/Contents/lib/scribus/").arg(pathPtr);
-	m_pluginDir = QString("%1/Contents/lib/scribus/plugins/").arg(pathPtr);
+	m_libDir = QString("%1/Contents/lib/").arg(pathPtr);
+	m_pluginDir = QString("%1/Contents/lib/").arg(pathPtr);
 //	QApplication::setLibraryPaths(QStringList(QString("%1/Contents/lib/qtplugins/").arg(pathPtr)));
-	QApplication::addLibraryPath(QString("%1/Contents/lib/qtplugins/").arg(pathPtr));
+	QApplication::addLibraryPath(QString("%1/Contents/PlugIns/").arg(pathPtr));
 //	CFRelease(pluginRef);
 //	CFRelease(macPath);
 




More information about the scribus-commit mailing list