diff options
author | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2013-03-02 15:46:37 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-03-05 20:59:45 +0100 |
commit | d28073d9eb0f35bae534470970e693a94463c549 (patch) | |
tree | d3331dc068105893fecd93868dd078d1ea57edaf /mkspecs | |
parent | 950b35cf97ad398f97883efd2a18ee97994a8a9c (diff) |
Distinguish between 'mac' and 'macx' qmake scopes
The former applies both on Mac OS X and iOS, but 'macx' is specific to
Mac OS X.
ios.conf and macx.conf now share most of their settings in the common
mac.conf. We set the default QMAKE_MAC_SDK before loading mac.conf, so
that any overrides in the device config will apply afterwards. This
means configure's mkspec parsing will be able to read the QMAKE_MAC_SDK.
Change-Id: I0c7e26a6a0103e19b23ef152aa9e4ab461cee632
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Diffstat (limited to 'mkspecs')
-rw-r--r-- | mkspecs/common/ios.conf | 23 | ||||
-rw-r--r-- | mkspecs/common/mac.conf | 29 | ||||
-rw-r--r-- | mkspecs/common/macx.conf | 32 | ||||
-rw-r--r-- | mkspecs/features/create_cmake.prf | 2 | ||||
-rw-r--r-- | mkspecs/features/qmltestcase.prf | 2 | ||||
-rw-r--r-- | mkspecs/features/resolve_target.prf | 2 | ||||
-rw-r--r-- | mkspecs/features/testcase.prf | 2 | ||||
-rw-r--r-- | mkspecs/unsupported/macx-ios-clang/qmake.conf | 24 |
8 files changed, 52 insertions, 64 deletions
diff --git a/mkspecs/common/ios.conf b/mkspecs/common/ios.conf index 5ff2f9b416..b7d2b84ec9 100644 --- a/mkspecs/common/ios.conf +++ b/mkspecs/common/ios.conf @@ -2,24 +2,7 @@ # qmake common configuration for iOS # -MAKEFILE_GENERATOR = UNIX -CONFIG += app_bundle reduce_exports incremental global_init_link_order lib_version_first plugin_no_soname sdk -QMAKE_INCREMENTAL_STYLE = sublib +QMAKE_PLATFORM += ios +QMAKE_MAC_SDK = iphoneos -# FIXME: Transform ios.conf to follow the same inheritance pattern as eg mac.conf and unix.conf -QMAKE_PLATFORM = ios $$QMAKE_PLATFORM - -# Not deploying to Mac OSX -QMAKE_MACOSX_DEPLOYMENT_TARGET = - -# But to iOS -QMAKE_IOS_DEPLOYMENT_TARGET = 4.3 - -# Add iOS common folder to include path -INCLUDEPATH += $$PWD/ios - -# iOS defines -DEFINES += DARWIN_NO_CARBON QT_NO_CORESERVICES QT_NO_PRINTER QT_NO_PRINTDIALOG - -# Universal target (iPhone and iPad) -QMAKE_IOS_TARGETED_DEVICE_FAMILY = 1,2 +include(mac.conf) diff --git a/mkspecs/common/mac.conf b/mkspecs/common/mac.conf new file mode 100644 index 0000000000..5d7cb1a91b --- /dev/null +++ b/mkspecs/common/mac.conf @@ -0,0 +1,29 @@ +# +# qmake configuration for common Mac OS (OSX and iOS) +# + +!load(device_config): error(Could not successfully load device configuration) + +QMAKE_PLATFORM += mac + +QMAKE_RESOURCE = /Developer/Tools/Rez +QMAKE_EXTENSION_SHLIB = dylib +QMAKE_LIBDIR = + +# sdk.prf will prefix the proper SDK sysroot +QMAKE_INCDIR_OPENGL = \ + /System/Library/Frameworks/OpenGL.framework/Headers \ + /System/Library/Frameworks/AGL.framework/Headers/ + +QMAKE_FIX_RPATH = install_name_tool -id + +QMAKE_LFLAGS_RPATH = + +QMAKE_LIBS_DYNLOAD = +QMAKE_LIBS_OPENGL = -framework OpenGL -framework AGL +QMAKE_LIBS_THREAD = + +QMAKE_AR = ar cq +QMAKE_RANLIB = ranlib -s + +include(unix.conf) diff --git a/mkspecs/common/macx.conf b/mkspecs/common/macx.conf index 5f5ed80e4d..eb39d1cf8d 100644 --- a/mkspecs/common/macx.conf +++ b/mkspecs/common/macx.conf @@ -1,34 +1,8 @@ # # qmake configuration for common Mac OS X # -!load(device_config) { - error(Could not successfully load device configuration) -} -QMAKE_PLATFORM += macx mac +QMAKE_PLATFORM += macx +QMAKE_MAC_SDK = macosx -isEmpty(QMAKE_MAC_SDK): QMAKE_MAC_SDK = macosx - -QMAKE_RESOURCE = /Developer/Tools/Rez - -QMAKE_EXTENSION_SHLIB = dylib - -QMAKE_LIBDIR = - -# sdk.prf will prefix the proper SDK sysroot -QMAKE_INCDIR_OPENGL = \ - /System/Library/Frameworks/OpenGL.framework/Headers \ - /System/Library/Frameworks/AGL.framework/Headers/ - -QMAKE_FIX_RPATH = install_name_tool -id - -QMAKE_LFLAGS_RPATH = - -QMAKE_LIBS_DYNLOAD = -QMAKE_LIBS_OPENGL = -framework OpenGL -framework AGL -QMAKE_LIBS_THREAD = - -QMAKE_AR = ar cq -QMAKE_RANLIB = ranlib -s - -include(unix.conf) +include(mac.conf) diff --git a/mkspecs/features/create_cmake.prf b/mkspecs/features/create_cmake.prf index 43dca4cd70..6b15236246 100644 --- a/mkspecs/features/create_cmake.prf +++ b/mkspecs/features/create_cmake.prf @@ -83,7 +83,7 @@ CMAKE_MKSPEC = $$[QMAKE_XSPEC] CMAKE_QT_STEM = Qt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX} -macx { +mac { !isEmpty(CMAKE_STATIC_TYPE) { CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}_debug.a CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a diff --git a/mkspecs/features/qmltestcase.prf b/mkspecs/features/qmltestcase.prf index 71e70e06a4..335ba90009 100644 --- a/mkspecs/features/qmltestcase.prf +++ b/mkspecs/features/qmltestcase.prf @@ -2,7 +2,7 @@ CONFIG += testcase QT += qml qmltest -macx: CONFIG -= app_bundle +mac: CONFIG -= app_bundle # If the .pro file specified an IMPORTPATH, then add that to # the command-line when the test is run. diff --git a/mkspecs/features/resolve_target.prf b/mkspecs/features/resolve_target.prf index 8cd12b2a00..22d7722ce3 100644 --- a/mkspecs/features/resolve_target.prf +++ b/mkspecs/features/resolve_target.prf @@ -28,7 +28,7 @@ win32 { } else { contains(TEMPLATE, .*lib):LIBPREFIX = lib - macx { + mac { equals(TEMPLATE, lib) { lib_bundle { QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}$${TARGET}.framework/$${TARGET} diff --git a/mkspecs/features/testcase.prf b/mkspecs/features/testcase.prf index faf4eeb124..15febe2dd5 100644 --- a/mkspecs/features/testcase.prf +++ b/mkspecs/features/testcase.prf @@ -32,7 +32,7 @@ contains(MUNGED_TARGET,.*/.*):check.commands = cd $(DESTDIR) && # Allow for a custom test runner script check.commands += $(TESTRUNNER) -macx { +mac { app_bundle: check.commands += ./$(QMAKE_TARGET).app/Contents/MacOS/$(QMAKE_TARGET) else: check.commands += ./$(QMAKE_TARGET) } diff --git a/mkspecs/unsupported/macx-ios-clang/qmake.conf b/mkspecs/unsupported/macx-ios-clang/qmake.conf index 47aeff8139..7805c079bb 100644 --- a/mkspecs/unsupported/macx-ios-clang/qmake.conf +++ b/mkspecs/unsupported/macx-ios-clang/qmake.conf @@ -2,24 +2,26 @@ # qmake configuration for macx-ios-clang # -!load(device_config): error("Could not successfully load device configuration.") +MAKEFILE_GENERATOR = UNIX +CONFIG += app_bundle reduce_exports incremental global_init_link_order lib_version_first plugin_no_soname sdk +QMAKE_INCREMENTAL_STYLE = sublib -isEmpty(QMAKE_MAC_SDK): QMAKE_MAC_SDK = iphoneos +QMAKE_MACOSX_DEPLOYMENT_TARGET = +QMAKE_IOS_DEPLOYMENT_TARGET = 4.3 -# iOS is considered a variant of MacOS by Apple. We follow this to -# keep things simple, e.g. by defining Q_OS_MAC _and_ Q_OS_IOS. -include(../../common/macx.conf) - -include(../../common/gcc-base-mac.conf) -include(../../common/xcode.conf) -include(../../common/clang.conf) -include(../../common/clang-mac.conf) +INCLUDEPATH += $$PWD/ios +DEFINES += DARWIN_NO_CARBON QT_NO_CORESERVICES QT_NO_PRINTER QT_NO_PRINTDIALOG +# Universal target (iPhone and iPad) +QMAKE_IOS_TARGETED_DEVICE_FAMILY = 1,2 -# Version check +include(../../common/xcode.conf) lessThan(QMAKE_XCODE_VERSION, "4.3"): error("This mkspec requires Xcode 4.3 or later") include(../../common/ios.conf) +include(../../common/gcc-base-mac.conf) +include(../../common/clang.conf) +include(../../common/clang-mac.conf) include(../../common/ios/clang.conf) include(../../common/ios/qmake.conf) |