--- mkspecs/common/gcc-base-macx.conf.orig +++ mkspecs/common/gcc-base-macx.conf @@ -29,12 +29,23 @@ QMAKE_OBJECTIVE_CFLAGS_WARN_OFF = $$QMAKE_CFLAGS_WARN_OFF QMAKE_OBJECTIVE_CFLAGS_DEBUG = $$QMAKE_CFLAGS_DEBUG QMAKE_OBJECTIVE_CFLAGS_RELEASE = $$QMAKE_CFLAGS_RELEASE -QMAKE_OBJECTIVE_CFLAGS_HIDESYMS = $$QMAKE_CXXFLAGS_HIDESYMS +QMAKE_OBJECTIVE_CFLAGS_HIDESYMS = $$QMAKE_CFLAGS_HIDESYMS QMAKE_OBJECTIVE_CFLAGS_X86 = $$QMAKE_CFLAGS_X86 QMAKE_OBJECTIVE_CFLAGS_X86_64 = $$QMAKE_CFLAGS_X86_64 QMAKE_OBJECTIVE_CFLAGS_PPC = $$QMAKE_CFLAGS_PPC QMAKE_OBJECTIVE_CFLAGS_PPC_64 = $$QMAKE_CFLAGS_PPC_64 +QMAKE_OBJECTIVE_CXXFLAGS = $$QMAKE_CXXFLAGS +QMAKE_OBJECTIVE_CXXFLAGS_WARN_ON = $$QMAKE_CXXFLAGS_WARN_ON +QMAKE_OBJECTIVE_CXXFLAGS_WARN_OFF = $$QMAKE_CXXFLAGS_WARN_OFF +QMAKE_OBJECTIVE_CXXFLAGS_DEBUG = $$QMAKE_CXXFLAGS_DEBUG +QMAKE_OBJECTIVE_CXXFLAGS_RELEASE = $$QMAKE_CXXFLAGS_RELEASE +QMAKE_OBJECTIVE_CXXFLAGS_HIDESYMS = $$QMAKE_CXXFLAGS_HIDESYMS +QMAKE_OBJECTIVE_CXXFLAGS_X86 = $$QMAKE_CXXFLAGS_X86 +QMAKE_OBJECTIVE_CXXFLAGS_X86_64 = $$QMAKE_CXXFLAGS_X86_64 +QMAKE_OBJECTIVE_CXXFLAGS_PPC = $$QMAKE_CXXFLAGS_PPC +QMAKE_OBJECTIVE_CXXFLAGS_PPC_64 = $$QMAKE_CXXFLAGS_PPC_64 + QMAKE_LFLAGS_X86 += $$QMAKE_CFLAGS_X86 QMAKE_LFLAGS_X86_64 += $$QMAKE_CFLAGS_X86_64 QMAKE_LFLAGS_PPC += $$QMAKE_CFLAGS_PPC --- mkspecs/features/debug.prf.orig +++ mkspecs/features/debug.prf @@ -3,6 +3,7 @@ QMAKE_CFLAGS += $$QMAKE_CFLAGS_DEBUG QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_DEBUG QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_DEBUG +QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_DEBUG QMAKE_LFLAGS += $$QMAKE_LFLAGS_DEBUG QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_DEBUG !debug_and_release:fix_output_dirs:fixExclusiveOutputDirs(debug, release) --- mkspecs/features/mac/default_post.prf.orig +++ mkspecs/features/mac/default_post.prf @@ -1,5 +1,5 @@ load(default_post) -!no_objective_c:CONFIG += objective_c +!no_objective_c:CONFIG += split_sources objective_c objective_cxx # Pick a suitable default architecture for qmake-based applications. # If the Qt package contains one of x86 and x86_64, pick that one. If it --- mkspecs/features/mac/objective_c.prf.orig +++ mkspecs/features/mac/objective_c.prf @@ -1,23 +1,18 @@ - -for(source, SOURCES) { - contains(source,.*\\.mm?$) { - warning(Objective-C source \'$$source\' found in SOURCES but should be in OBJECTIVE_SOURCES) - SOURCES -= $$source - OBJECTIVE_SOURCES += $$source - } -} +# Add compiler directives for Objective C (.m) only +# +# OBJECTIVE_C_SOURCES has already been set in "split_sources" isEmpty(QMAKE_OBJECTIVE_CC):QMAKE_OBJECTIVE_CC = $$QMAKE_CC OBJECTIVE_C_OBJECTS_DIR = $$OBJECTS_DIR isEmpty(OBJECTIVE_C_OBJECTS_DIR):OBJECTIVE_C_OBJECTS_DIR = . -isEmpty(QMAKE_EXT_OBJECTIVE_C):QMAKE_EXT_OBJECTIVE_C = .mm .m +isEmpty(QMAKE_EXT_OBJECTIVE_C):QMAKE_EXT_OBJECTIVE_C = .m objective_c.dependency_type = TYPE_C objective_c.variables = QMAKE_OBJECTIVE_CFLAGS -objective_c.commands = $$QMAKE_OBJECTIVE_CC -c $(QMAKE_COMP_QMAKE_OBJECTIVE_CFLAGS) $(DEFINES) $(INCPATH) ${QMAKE_FILE_IN} -o ${QMAKE_FILE_OUT} +objective_c.commands = $$QMAKE_OBJECTIVE_CC -c $(QMAKE_COMP_QMAKE_OBJECTIVE_CFLAGS) $(DEFINES) $(INCPATH) -o ${QMAKE_FILE_OUT} ${QMAKE_FILE_IN} objective_c.output = $$OBJECTIVE_C_OBJECTS_DIR/${QMAKE_FILE_BASE}$${first(QMAKE_EXT_OBJ)} -objective_c.input = OBJECTIVE_SOURCES +objective_c.input = OBJECTIVE_C_SOURCES objective_c.name = Compile ${QMAKE_FILE_IN} silent:objective_c.commands = @echo objective-c ${QMAKE_FILE_IN} && $$objective_c.commands QMAKE_EXTRA_COMPILERS += objective_c --- mkspecs/features/mac/ppc.prf.orig +++ mkspecs/features/mac/ppc.prf @@ -2,6 +2,7 @@ } else { QMAKE_CFLAGS += $$QMAKE_CFLAGS_PPC QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_PPC + QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_PPC QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_PPC QMAKE_LFLAGS += $$QMAKE_LFLAGS_PPC } --- mkspecs/features/mac/ppc64.prf.orig +++ mkspecs/features/mac/ppc64.prf @@ -2,6 +2,7 @@ } else { QMAKE_CFLAGS += $$QMAKE_CFLAGS_PPC_64 QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_PPC_64 + QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_PPC_64 QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_PPC_64 QMAKE_LFLAGS += $$QMAKE_LFLAGS_PPC_64 } --- mkspecs/features/mac/sdk.prf.orig +++ mkspecs/features/mac/sdk.prf @@ -2,6 +2,7 @@ !macx-xcode:!macx-pbuilder { QMAKE_CFLAGS += -isysroot $$QMAKE_MAC_SDK QMAKE_OBJECTIVE_CFLAGS += -isysroot $$QMAKE_MAC_SDK + QMAKE_OBJECTIVE_CXXFLAGS += -isysroot $$QMAKE_MAC_SDK QMAKE_CXXFLAGS += -isysroot $$QMAKE_MAC_SDK QMAKE_LFLAGS += -Wl,-syslibroot,$$QMAKE_MAC_SDK } --- mkspecs/features/mac/x86.prf.orig +++ mkspecs/features/mac/x86.prf @@ -2,6 +2,7 @@ } else { QMAKE_CFLAGS += $$QMAKE_CFLAGS_X86 QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_X86 + QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_X86 QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_X86 QMAKE_LFLAGS += $$QMAKE_LFLAGS_X86 } --- mkspecs/features/mac/x86_64.prf.orig +++ mkspecs/features/mac/x86_64.prf @@ -2,6 +2,7 @@ } else { QMAKE_CFLAGS += $$QMAKE_CFLAGS_X86_64 QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_X86_64 + QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_X86_64 QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_X86_64 QMAKE_LFLAGS += $$QMAKE_LFLAGS_X86_64 } --- mkspecs/features/release.prf.orig +++ mkspecs/features/release.prf @@ -2,6 +2,7 @@ QMAKE_CFLAGS += $$QMAKE_CFLAGS_RELEASE QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_RELEASE QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_RELEASE +QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_RELEASE QMAKE_LFLAGS += $$QMAKE_LFLAGS_RELEASE QMAKE_LIBFLAGS += $$QMAKE_LIBFLAGS_RELEASE -!debug_and_release:fix_output_dirs:fixExclusiveOutputDirs(release, debug) \ No newline at end of file +!debug_and_release:fix_output_dirs:fixExclusiveOutputDirs(release, debug) --- mkspecs/features/unix/hide_symbols.prf.orig +++ mkspecs/features/unix/hide_symbols.prf @@ -1,4 +1,5 @@ QMAKE_CFLAGS += $$QMAKE_CFLAGS_HIDESYMS QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_HIDESYMS QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_HIDESYMS +QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_HIDESYMS QMAKE_LFLAGS += $$QMAKE_LFLAGS_HIDESYMS --- mkspecs/features/warn_off.prf.orig +++ mkspecs/features/warn_off.prf @@ -1,4 +1,5 @@ CONFIG -= warn_on QMAKE_CFLAGS += $$QMAKE_CFLAGS_WARN_OFF QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_WARN_OFF -QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_WARN_OFF \ No newline at end of file +QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_WARN_OFF +QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_WARN_OFF --- mkspecs/features/warn_on.prf.orig +++ mkspecs/features/warn_on.prf @@ -2,4 +2,4 @@ QMAKE_CFLAGS += $$QMAKE_CFLAGS_WARN_ON QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_WARN_ON QMAKE_OBJECTIVE_CFLAGS += $$QMAKE_OBJECTIVE_CFLAGS_WARN_ON - +QMAKE_OBJECTIVE_CXXFLAGS += $$QMAKE_OBJECTIVE_CXXFLAGS_WARN_ON