X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=build%2Fquassel.pro;h=6dce1c0a77e8a32db77dfb5de4635dd6a1d935a4;hp=5be5fde2e1572ef4e56a7bdec9f2abaeec443832;hb=cf7c5679c2475bb563cd64e15477c485d89368a3;hpb=3017ca500bea98409a336e98e382b8bef1f08fce diff --git a/build/quassel.pro b/build/quassel.pro index 5be5fde2..6dce1c0a 100644 --- a/build/quassel.pro +++ b/build/quassel.pro @@ -13,46 +13,42 @@ # # 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) { - BUILD = all # build everything by default -} - -contains(BUILD, all) { - BUILD += qtgui core mono -} - -contains(BUILD, mono) { - include(targets/monolithic.pri) - BUILD_MODS *= $${MODULES} - BUILD_TARGETS *= monolithic -} +TARGETS = qtclient core mono -contains(BUILD, core) { - include(targets/core.pri) - BUILD_MODS *= $${MODULES} - BUILD_TARGETS *= core -} +# Check build configuration +isEmpty(BUILD): BUILD = all # build everything by default +contains(BUILD, all): BUILD = $${TARGETS} -contains(BUILD, qtgui) { - include(targets/qtgui.pri) +# Find modules and targets to build +for(target, TARGETS): contains(BUILD, $$target) { + include(targets/$${target}.pri) BUILD_MODS *= $${MODULES} - BUILD_TARGETS *= qtgui + BUILD_TARGETS *= $$target } -# Now, we first build all needed modules... +# 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) } -# ... followed by the binaries. +# 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) } +