summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlli Werwolff <qt-info@nokia.com>2010-03-30 14:48:20 +0200
committerOlli Werwolff <qt-info@nokia.com>2010-03-30 14:48:20 +0200
commit03e409d190953cc5b2fcf4ecb223014e8b338ee2 (patch)
tree28b16d2265c8bdbbd0ddfec92d704cae74f93121
parente8ac52d76fb9a2e27df5a57cd212edc8e7f7c29d (diff)
Build proper named libs on windows/mac
Done-with: ckamm
-rw-r--r--src/adjusttarget.pri52
-rw-r--r--src/src.pro1
2 files changed, 53 insertions, 0 deletions
diff --git a/src/adjusttarget.pri b/src/adjusttarget.pri
new file mode 100644
index 0000000..ee9e9a5
--- /dev/null
+++ b/src/adjusttarget.pri
@@ -0,0 +1,52 @@
+# Expects target to be set and changes it
+
+win32 | macx {
+ RELEASEMODE=unspecified
+
+ !build_pass {
+ win32 {
+ contains(CONFIG_WIN,debug) {
+ RELEASEMODE=debug
+ } else:contains(CONFIG_WIN,release) {
+ RELEASEMODE=release
+ }
+ }
+
+ # In Windows we want to build libraries in debug and release mode if the user
+ # didn't select a version, and if Qt is built in debug_and_release.
+ # This avoids problems for third parties as qmake builds debug mode by default
+ # Silently disable unsupported configurations
+
+ # MacOSX always builds debug and release libs when using mac framework
+
+ CONFIG -= debug release debug_and_release build_all
+
+ contains(RELEASEMODE,unspecified) {
+ contains(QT_CONFIG,debug):contains(QT_CONFIG,release) | (macx:contains(QT_CONFIG,qt_framework):contains(TEMPLATE,.*lib)) {
+ CONFIG += debug_and_release build_all
+ } else {
+ contains(QT_CONFIG,debug): CONFIG+=debug
+ contains(QT_CONFIG,release): CONFIG+=release
+ }
+ } else {
+ CONFIG += $$RELEASEMODE
+ }
+ }
+
+ #suffix changes
+ contains(TEMPLATE,.*lib) {
+ TARGET=$$qtLibraryTarget($${TARGET})
+ }
+}
+
+DESTDIR=build
+
+# build libraries as frameworks on OSX, omitting plugins.
+mac:contains(QT_CONFIG,qt_framework) {
+ CONFIG += lib_bundle absolute_library_soname
+ FRAMEWORK_HEADERS.version = Versions
+ FRAMEWORK_HEADERS.files = $${PUBLIC_HEADERS}
+ FRAMEWORK_HEADERS.path = Headers
+ QMAKE_BUNDLE_DATA += FRAMEWORK_HEADERS
+}
+
diff --git a/src/src.pro b/src/src.pro
index ca72f7d..e086c79 100644
--- a/src/src.pro
+++ b/src/src.pro
@@ -5,6 +5,7 @@ unix: CONFIG += hide_symbols
DESTDIR = ../lib
TARGET = coroutine
+include(adjusttarget.pri)
HEADERS += \
coroutine.h \