From 37348a2052706692fde70a98decc55c565b98e88 2012-06-11 09:40:58 From: Jani Honkonen Date: 2012-06-11 09:40:58 Subject: [PATCH] Fix building debug & release at the same time - Separate folders for debug & release intermediate files * The files ARE different depending on build type. - By default windows build build both debug and release. This is standard Qt way. - qml plugin now has the debug prefix also. --- diff --git a/config.pri b/config.pri index 6fea298..95b6418 100644 --- a/config.pri +++ b/config.pri @@ -29,6 +29,10 @@ CHART_BUILD_BIN_DIR = $$SHADOW/bin CHART_BUILD_PLUGIN_DIR = $$CHART_BUILD_BIN_DIR/QtCommercial/Chart CHART_BUILD_DOC_DIR = $$SHADOW/doc +# Use own folders for debug and release builds +CONFIG(debug, debug|release):CHART_BUILD_DIR = $$join(CHART_BUILD_DIR,,,/debug) +CONFIG(release, debug|release): CHART_BUILD_DIR = $$join(CHART_BUILD_DIR,,,/release) + win32:{ CHART_BUILD_PUBLIC_HEADER_DIR = $$replace(CHART_BUILD_PUBLIC_HEADER_DIR, "/","\\") CHART_BUILD_PRIVATE_HEADER_DIR = $$replace(CHART_BUILD_PRIVATE_HEADER_DIR, "/","\\") diff --git a/plugins/declarative/declarative.pro b/plugins/declarative/declarative.pro index c2e8fee..7eb4fa6 100644 --- a/plugins/declarative/declarative.pro +++ b/plugins/declarative/declarative.pro @@ -10,6 +10,17 @@ contains(QT_MAJOR_VERSION, 5) { DEFINES += QTQUICK2 } +CONFIG(debug, debug|release) { + mac: TARGET = $$join(TARGET,,,_debug) + win32: TARGET = $$join(TARGET,,,d) +} + +# enable building debug and release at the same time +CONFIG += debug_and_release + +# On windows by default build both debug and release at the same time +win32:CONFIG += build_all + SOURCES += \ plugin.cpp \ declarativechart.cpp \ diff --git a/src/src.pro b/src/src.pro index d774f36..d11795a 100644 --- a/src/src.pro +++ b/src/src.pro @@ -19,6 +19,12 @@ unix:{ QMAKE_CXXFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden } +# enable building debug and release at the same time +CONFIG += debug_and_release + +# On windows by default build both debug and release at the same time +win32:CONFIG += build_all + ############################# DEPEDENCES ######################################## win32-msvc*: LIBS += User32.lib