We put the project-wide value of CONFIG in build/buildconf.pri now, in order to quickly
[quassel.git] / build / quassel.pro
index fd36dda..5be5fde 100644 (file)
@@ -1,6 +1,30 @@
+# This project file can be used to set up a build environment for quassel.
+# To build the default configuration (i.e. qtgui, core and monolithic client),
+# simply run
+#
+# > qmake && make
+#
+# in this directory. In order to select the binaries to build, you may set
+# the BUILD variable as follows:
+#
+# > qmake BUILD=<mode> && make
+#
+# where <mode> is a quoted string that may contain any of 'qtgui', 'core', 'mono' or 'all'.
+#
+# NOTE: To change the build configuration, you have to run 'make distclean' first!
+
+
+# Set project-wide config options
+
+#CONFIG = qt warn_on release
+
+TEMPLATE = subdirs
+
+# Check build configuration
 isEmpty(BUILD) {
 isEmpty(BUILD) {
-  BUILD = all
+  BUILD = all  # build everything by default
 }
 }
+
 contains(BUILD, all) {
   BUILD += qtgui core mono
 }
 contains(BUILD, all) {
   BUILD += qtgui core mono
 }
@@ -17,14 +41,18 @@ contains(BUILD, core) {
   BUILD_TARGETS *= core
 }
 
   BUILD_TARGETS *= core
 }
 
-TEMPLATE = subdirs
+contains(BUILD, qtgui) {
+  include(targets/qtgui.pri)
+  BUILD_MODS *= $${MODULES}
+  BUILD_TARGETS *= qtgui
+}
 
 
+# Now, we first build all needed modules...
 for(mod, BUILD_MODS) {
   SUBDIRS += modules/$${mod}.pro
 }
 
 for(mod, BUILD_MODS) {
   SUBDIRS += modules/$${mod}.pro
 }
 
+# ... followed by the binaries.
 for(target, BUILD_TARGETS) {
   SUBDIRS += targets/$${target}.pro
 }
 for(target, BUILD_TARGETS) {
   SUBDIRS += targets/$${target}.pro
 }
-
-CONFIG += qt warn_on