summaryrefslogtreecommitdiffstats
path: root/mkspecs
diff options
context:
space:
mode:
authorMorten Sorvig <msorvig@trolltech.com>2009-09-10 10:34:22 +0200
committerMorten Sorvig <msorvig@trolltech.com>2009-09-10 10:34:22 +0200
commit4de4da9e3cc3acc7a91599447ee632e9db16ff6d (patch)
treef1cee20b0d89919cecd903204e971f59ffcf58f7 /mkspecs
parent855f1705ceb15c303b55fcced8b0303d90352a44 (diff)
Make static builds work fot Qt/Cocoa.
Add -all_load to make Objective-C categories work. Enable hide_symbols to remove visibility issues.
Diffstat (limited to 'mkspecs')
-rw-r--r--mkspecs/common/mac-g++.conf2
-rw-r--r--mkspecs/features/static.prf6
2 files changed, 8 insertions, 0 deletions
diff --git a/mkspecs/common/mac-g++.conf b/mkspecs/common/mac-g++.conf
index dca2e2f8f6..18638985eb 100644
--- a/mkspecs/common/mac-g++.conf
+++ b/mkspecs/common/mac-g++.conf
@@ -65,6 +65,8 @@ QMAKE_LFLAGS_PPC += -arch ppc
QMAKE_LFLAGS_X86 += -arch i386
QMAKE_LFLAGS_VERSION += -current_version$${LITERAL_WHITESPACE}
QMAKE_LFLAGS_COMPAT_VERSION += -compatibility_version$${LITERAL_WHITESPACE}
+# -all_load requred to make Objective-C categories work in static builds.
+QMAKE_LFLAGS_STATIC_LIB += -all_load
QMAKE_RPATH +=
QMAKE_PCH_OUTPUT_EXT = .gch
diff --git a/mkspecs/features/static.prf b/mkspecs/features/static.prf
index 6e2b54f4cb..7ee7a8abd8 100644
--- a/mkspecs/features/static.prf
+++ b/mkspecs/features/static.prf
@@ -6,4 +6,10 @@ contains(TEMPLATE, ".*lib"):{
QMAKE_CXXFLAGS += $$QMAKE_CXXFLAGS_STATIC_LIB
}
}
+
+mac {
+ QMAKE_LFLAGS += $$QMAKE_LFLAGS_STATIC_LIB
+ CONFIG += hide_symbols
+}
+
!static_and_shared:fix_output_dirs:fixExclusiveOutputDirs(static, shared)