TEMPLATE = subdirs # 无人机螺杆检测项目(板一:采集 + 算法 + 推流;板二:拉流 + 控制) # 根据父项目的 TARGET_APP 变量自动判断编译目标: # TARGET_APP=DroneScrewServer - 仅编译 DroneScrewServer (板一) # TARGET_APP=DroneScrewCtrlApp - 仅编译 DroneScrewCtrlApp (板二) # TARGET_APP=DroneScrewbolt - 编译全部 # 未指定 TARGET_APP - 编译全部 (默认) DroneScrewCtrlConfig.file = DroneScrewCtrlConfig/DroneScrewCtrlConfig.pro DroneScrewCtrlApp.file = DroneScrewCtrlApp/DroneScrewCtrlApp.pro equals(TARGET_APP, "DroneScrewServer") { # 仅编译 Server (板一) SUBDIRS += DroneScrewServer/DroneScrewServer.pro } else:equals(TARGET_APP, "DroneScrewCtrlApp") { # 仅编译 CtrlApp (板二) SUBDIRS += DroneScrewCtrlConfig SUBDIRS += DroneScrewCtrlApp DroneScrewCtrlApp.depends = DroneScrewCtrlConfig } else { # 编译全部 (TARGET_APP=DroneScrewbolt 或未指定) SUBDIRS += DroneScrewCtrlConfig SUBDIRS += DroneScrewServer/DroneScrewServer.pro SUBDIRS += DroneScrewCtrlApp DroneScrewCtrlApp.depends = DroneScrewCtrlConfig }