mirror of https://github.com/qt/qtbase.git
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>
This commit is contained in:
parent
950b35cf97
commit
d28073d9eb
|
@ -2,24 +2,7 @@
|
||||||
# qmake common configuration for iOS
|
# qmake common configuration for iOS
|
||||||
#
|
#
|
||||||
|
|
||||||
MAKEFILE_GENERATOR = UNIX
|
QMAKE_PLATFORM += ios
|
||||||
CONFIG += app_bundle reduce_exports incremental global_init_link_order lib_version_first plugin_no_soname sdk
|
QMAKE_MAC_SDK = iphoneos
|
||||||
QMAKE_INCREMENTAL_STYLE = sublib
|
|
||||||
|
|
||||||
# FIXME: Transform ios.conf to follow the same inheritance pattern as eg mac.conf and unix.conf
|
include(mac.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
|
|
||||||
|
|
|
@ -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)
|
|
@ -1,34 +1,8 @@
|
||||||
#
|
#
|
||||||
# qmake configuration for common Mac OS X
|
# 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
|
include(mac.conf)
|
||||||
|
|
||||||
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)
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ CMAKE_MKSPEC = $$[QMAKE_XSPEC]
|
||||||
|
|
||||||
CMAKE_QT_STEM = Qt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}
|
CMAKE_QT_STEM = Qt$$eval(QT.$${MODULE}.MAJOR_VERSION)$${CMAKE_MODULE_NAME}$${QT_LIBINFIX}
|
||||||
|
|
||||||
macx {
|
mac {
|
||||||
!isEmpty(CMAKE_STATIC_TYPE) {
|
!isEmpty(CMAKE_STATIC_TYPE) {
|
||||||
CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}_debug.a
|
CMAKE_LIB_FILE_LOCATION_DEBUG = lib$${CMAKE_QT_STEM}_debug.a
|
||||||
CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
|
CMAKE_LIB_FILE_LOCATION_RELEASE = lib$${CMAKE_QT_STEM}.a
|
||||||
|
|
|
@ -2,7 +2,7 @@ CONFIG += testcase
|
||||||
|
|
||||||
QT += qml qmltest
|
QT += qml qmltest
|
||||||
|
|
||||||
macx: CONFIG -= app_bundle
|
mac: CONFIG -= app_bundle
|
||||||
|
|
||||||
# If the .pro file specified an IMPORTPATH, then add that to
|
# If the .pro file specified an IMPORTPATH, then add that to
|
||||||
# the command-line when the test is run.
|
# the command-line when the test is run.
|
||||||
|
|
|
@ -28,7 +28,7 @@ win32 {
|
||||||
} else {
|
} else {
|
||||||
contains(TEMPLATE, .*lib):LIBPREFIX = lib
|
contains(TEMPLATE, .*lib):LIBPREFIX = lib
|
||||||
|
|
||||||
macx {
|
mac {
|
||||||
equals(TEMPLATE, lib) {
|
equals(TEMPLATE, lib) {
|
||||||
lib_bundle {
|
lib_bundle {
|
||||||
QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}$${TARGET}.framework/$${TARGET}
|
QMAKE_RESOLVED_TARGET = $${QMAKE_RESOLVED_TARGET}$${TARGET}.framework/$${TARGET}
|
||||||
|
|
|
@ -32,7 +32,7 @@ contains(MUNGED_TARGET,.*/.*):check.commands = cd $(DESTDIR) &&
|
||||||
# Allow for a custom test runner script
|
# Allow for a custom test runner script
|
||||||
check.commands += $(TESTRUNNER)
|
check.commands += $(TESTRUNNER)
|
||||||
|
|
||||||
macx {
|
mac {
|
||||||
app_bundle: check.commands += ./$(QMAKE_TARGET).app/Contents/MacOS/$(QMAKE_TARGET)
|
app_bundle: check.commands += ./$(QMAKE_TARGET).app/Contents/MacOS/$(QMAKE_TARGET)
|
||||||
else: check.commands += ./$(QMAKE_TARGET)
|
else: check.commands += ./$(QMAKE_TARGET)
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,24 +2,26 @@
|
||||||
# qmake configuration for macx-ios-clang
|
# 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
|
INCLUDEPATH += $$PWD/ios
|
||||||
# keep things simple, e.g. by defining Q_OS_MAC _and_ Q_OS_IOS.
|
DEFINES += DARWIN_NO_CARBON QT_NO_CORESERVICES QT_NO_PRINTER QT_NO_PRINTDIALOG
|
||||||
include(../../common/macx.conf)
|
|
||||||
|
# Universal target (iPhone and iPad)
|
||||||
|
QMAKE_IOS_TARGETED_DEVICE_FAMILY = 1,2
|
||||||
|
|
||||||
include(../../common/gcc-base-mac.conf)
|
|
||||||
include(../../common/xcode.conf)
|
include(../../common/xcode.conf)
|
||||||
include(../../common/clang.conf)
|
|
||||||
include(../../common/clang-mac.conf)
|
|
||||||
|
|
||||||
|
|
||||||
# Version check
|
|
||||||
lessThan(QMAKE_XCODE_VERSION, "4.3"): error("This mkspec requires Xcode 4.3 or later")
|
lessThan(QMAKE_XCODE_VERSION, "4.3"): error("This mkspec requires Xcode 4.3 or later")
|
||||||
|
|
||||||
include(../../common/ios.conf)
|
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/clang.conf)
|
||||||
include(../../common/ios/qmake.conf)
|
include(../../common/ios/qmake.conf)
|
||||||
|
|
||||||
|
|
|
@ -117,12 +117,12 @@ win32 {
|
||||||
io/qprocess_unix.cpp \
|
io/qprocess_unix.cpp \
|
||||||
io/qfilesystemiterator_unix.cpp \
|
io/qfilesystemiterator_unix.cpp \
|
||||||
|
|
||||||
!nacl:macx-*: {
|
!nacl:mac: {
|
||||||
SOURCES += io/qfilesystemengine_mac.cpp
|
SOURCES += io/qfilesystemengine_mac.cpp
|
||||||
SOURCES += io/qsettings_mac.cpp
|
SOURCES += io/qsettings_mac.cpp
|
||||||
}
|
}
|
||||||
macx-*: {
|
mac {
|
||||||
!ios {
|
macx {
|
||||||
SOURCES += io/qstandardpaths_mac.cpp
|
SOURCES += io/qstandardpaths_mac.cpp
|
||||||
} else {
|
} else {
|
||||||
SOURCES += io/qstandardpaths_unix.cpp
|
SOURCES += io/qstandardpaths_unix.cpp
|
||||||
|
@ -139,7 +139,7 @@ win32 {
|
||||||
}
|
}
|
||||||
|
|
||||||
!nacl {
|
!nacl {
|
||||||
freebsd-*|macx-*|darwin-*|openbsd-*:{
|
freebsd-*|mac|darwin-*|openbsd-*:{
|
||||||
SOURCES += io/qfilesystemwatcher_kqueue.cpp
|
SOURCES += io/qfilesystemwatcher_kqueue.cpp
|
||||||
HEADERS += io/qfilesystemwatcher_kqueue_p.h
|
HEADERS += io/qfilesystemwatcher_kqueue_p.h
|
||||||
}
|
}
|
||||||
|
|
|
@ -56,7 +56,7 @@ integrity:SOURCES += thread/qmutex_unix.cpp \
|
||||||
thread/qwaitcondition_unix.cpp
|
thread/qwaitcondition_unix.cpp
|
||||||
|
|
||||||
unix: {
|
unix: {
|
||||||
macx-* {
|
mac {
|
||||||
SOURCES += thread/qmutex_mac.cpp
|
SOURCES += thread/qmutex_mac.cpp
|
||||||
} else:linux-*:!linux-lsb-* {
|
} else:linux-*:!linux-lsb-* {
|
||||||
SOURCES += thread/qmutex_linux.cpp
|
SOURCES += thread/qmutex_linux.cpp
|
||||||
|
|
|
@ -9,7 +9,7 @@ linux*:qtHaveModule(dbus) {
|
||||||
win32:SUBDIRS += generic
|
win32:SUBDIRS += generic
|
||||||
blackberry:SUBDIRS += blackberry
|
blackberry:SUBDIRS += blackberry
|
||||||
win32:!wince*:SUBDIRS += nativewifi
|
win32:!wince*:SUBDIRS += nativewifi
|
||||||
macx:contains(QT_CONFIG, corewlan):SUBDIRS += corewlan
|
mac:contains(QT_CONFIG, corewlan):SUBDIRS += corewlan
|
||||||
macx:SUBDIRS += generic
|
mac:SUBDIRS += generic
|
||||||
|
|
||||||
isEmpty(SUBDIRS):SUBDIRS = generic
|
isEmpty(SUBDIRS):SUBDIRS = generic
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
TEMPLATE = subdirs
|
TEMPLATE = subdirs
|
||||||
qtHaveModule(dbus) {
|
qtHaveModule(dbus) {
|
||||||
!macx:!win32:SUBDIRS += ibus maliit
|
!mac:!win32:SUBDIRS += ibus maliit
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,4 +6,4 @@ unix {
|
||||||
} else {
|
} else {
|
||||||
LIBS *= -loci
|
LIBS *= -loci
|
||||||
}
|
}
|
||||||
macx:QMAKE_LFLAGS += -Wl,-flat_namespace,-U,_environ
|
mac:QMAKE_LFLAGS += -Wl,-flat_namespace,-U,_environ
|
||||||
|
|
|
@ -113,7 +113,7 @@ win32:SOURCES += ../../corelib/io/qfilesystemengine_win.cpp \
|
||||||
../../corelib/io/qsettings_win.cpp \
|
../../corelib/io/qsettings_win.cpp \
|
||||||
../../corelib/plugin/qsystemlibrary.cpp \
|
../../corelib/plugin/qsystemlibrary.cpp \
|
||||||
|
|
||||||
macx: {
|
mac {
|
||||||
SOURCES += ../../corelib/io/qfilesystemengine_mac.cpp \
|
SOURCES += ../../corelib/io/qfilesystemengine_mac.cpp \
|
||||||
../../corelib/io/qsettings_mac.cpp \
|
../../corelib/io/qsettings_mac.cpp \
|
||||||
../../corelib/kernel/qcore_mac.cpp
|
../../corelib/kernel/qcore_mac.cpp
|
||||||
|
|
|
@ -40,7 +40,7 @@ contains( styles, all ) {
|
||||||
styles = fusion mac windows windowsxp windowsvista
|
styles = fusion mac windows windowsxp windowsvista
|
||||||
}
|
}
|
||||||
|
|
||||||
!macx-*|ios:styles -= mac
|
!mac:styles -= mac
|
||||||
|
|
||||||
contains(QT_CONFIG, gtkstyle) {
|
contains(QT_CONFIG, gtkstyle) {
|
||||||
QMAKE_CXXFLAGS += $$QT_CFLAGS_QGTKSTYLE
|
QMAKE_CXXFLAGS += $$QT_CFLAGS_QGTKSTYLE
|
||||||
|
|
|
@ -36,6 +36,6 @@ win32:!wince* {
|
||||||
SOURCES += util/qsystemtrayicon_qpa.cpp
|
SOURCES += util/qsystemtrayicon_qpa.cpp
|
||||||
}
|
}
|
||||||
|
|
||||||
macx {
|
mac {
|
||||||
OBJECTIVE_SOURCES += util/qscroller_mac.mm
|
OBJECTIVE_SOURCES += util/qscroller_mac.mm
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,5 +3,5 @@ CONFIG += parallel_test
|
||||||
TARGET = tst_qmetamethod
|
TARGET = tst_qmetamethod
|
||||||
QT = core testlib
|
QT = core testlib
|
||||||
SOURCES = tst_qmetamethod.cpp
|
SOURCES = tst_qmetamethod.cpp
|
||||||
macx:CONFIG -= app_bundle
|
mac:CONFIG -= app_bundle
|
||||||
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
|
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
|
||||||
|
|
|
@ -2,5 +2,5 @@ CONFIG += testcase parallel_test
|
||||||
TARGET = tst_qmetaobjectbuilder
|
TARGET = tst_qmetaobjectbuilder
|
||||||
QT = core-private gui-private testlib
|
QT = core-private gui-private testlib
|
||||||
SOURCES = tst_qmetaobjectbuilder.cpp
|
SOURCES = tst_qmetaobjectbuilder.cpp
|
||||||
macx:CONFIG -= app_bundle
|
mac:CONFIG -= app_bundle
|
||||||
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
|
DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0
|
||||||
|
|
|
@ -4,7 +4,7 @@ CONFIG += ordered
|
||||||
SUBDIRS = lib \
|
SUBDIRS = lib \
|
||||||
theplugin \
|
theplugin \
|
||||||
tst
|
tst
|
||||||
!win32: !macx-*: SUBDIRS += almostplugin
|
!win32: !mac: SUBDIRS += almostplugin
|
||||||
TARGET = tst_qpluginloader
|
TARGET = tst_qpluginloader
|
||||||
|
|
||||||
# no special install rule for subdir
|
# no special install rule for subdir
|
||||||
|
|
Loading…
Reference in New Issue