X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=build%2Fquassel.pro;h=6dce1c0a77e8a32db77dfb5de4635dd6a1d935a4;hp=7ce23875c43d5470cb1e1d1693c47ed1e230d564;hb=ed6852b1e5a3968a29222e5655c1131cc723fe5a;hpb=2eea4f7ac38f9c36a923d1ad3108aa1cd48f9749 diff --git a/build/quassel.pro b/build/quassel.pro index 7ce23875..6dce1c0a 100644 --- a/build/quassel.pro +++ b/build/quassel.pro @@ -13,45 +13,42 @@ # # NOTE: To change the build configuration, you have to run 'make distclean' first! - -# Set project-wide config options -CONFIG += qt debug warn_on - TEMPLATE = subdirs -# Check build configuration -isEmpty(BUILD) { - BUILD = all # build everything by default -} +TARGETS = qtclient core mono -contains(BUILD, all) { - BUILD += qtgui core mono -} - -contains(BUILD, mono) { - include(targets/monolithic.pri) - BUILD_MODS *= $${MODULES} - BUILD_TARGETS *= monolithic -} - -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) } +