X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=build%2Fquassel.pro;h=6dce1c0a77e8a32db77dfb5de4635dd6a1d935a4;hp=fd36ddac5277a44ff1eabc86e9e2d4e72cea9433;hb=4f57130f3cf27a397d04a5f6fe468e8e1108034d;hpb=d7052a3218b115ab68d24ea33e670ed26afd19ce diff --git a/build/quassel.pro b/build/quassel.pro index fd36ddac..6dce1c0a 100644 --- a/build/quassel.pro +++ b/build/quassel.pro @@ -1,30 +1,54 @@ -isEmpty(BUILD) { - BUILD = all -} -contains(BUILD, all) { - BUILD += qtgui core mono -} +# 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= && make +# +# where 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! -contains(BUILD, mono) { - include(targets/monolithic.pri) - BUILD_MODS *= $${MODULES} - BUILD_TARGETS *= monolithic -} +TEMPLATE = subdirs -contains(BUILD, core) { - include(targets/core.pri) +TARGETS = qtclient core mono + +# Check build configuration +isEmpty(BUILD): BUILD = all # build everything by default +contains(BUILD, all): BUILD = $${TARGETS} + +# Find modules and targets to build +for(target, TARGETS): contains(BUILD, $$target) { + include(targets/$${target}.pri) BUILD_MODS *= $${MODULES} - BUILD_TARGETS *= core + BUILD_TARGETS *= $$target } -TEMPLATE = subdirs - +# Now add modules and their deps for(mod, BUILD_MODS) { - SUBDIRS += modules/$${mod}.pro + include(../src/$${mod}/$${mod}.pri) + SUBDIRS += mod_$${mod} + eval(mod_$${mod}.file = modules/$${mod}.pro) + eval(mod_$${mod}.makefile = Makefile.mod_$${mod}) # This prevents distclean from removing our Makefile -_- + for(dep, DEPMOD): eval(mod_$${mod}.depends += mod_$${dep}) + export(mod_$${mod}.file) + export(mod_$${mod}.makefile) + export(mod_$${mod}.depends) } +# Same with targets for(target, BUILD_TARGETS) { - SUBDIRS += targets/$${target}.pro + include(targets/$${target}.pri) + SUBDIRS += $${target} + eval($${target}.file = targets/$${target}.pro) + eval($${target}.makefile = Makefile.target_$${target}) + for(mod, MODULES): eval($${target}.depends += mod_$${mod}) + export($${target}.file) + export($${target}.makefile) + export($${target}.depends) } -CONFIG += qt warn_on