TEMPLATE = subdirs BeltTearingConfig.file = BeltTearingConfig/BeltTearingConfig.pro BeltTearingApp.file = BeltTearingApp/BeltTearingApp.pro BeltTearingServer.file = BeltTearingServer/BeltTearingServer.pro SUBDIRS += BeltTearingConfig equals(TARGET_APP, "BeltTearing") { SUBDIRS += BeltTearingServer BeltTearingServer.depends = BeltTearingConfig } else { SUBDIRS += BeltTearingApp SUBDIRS += BeltTearingServer BeltTearingApp.depends = BeltTearingConfig BeltTearingServer.depends = BeltTearingConfig }