Instead of add_dependencies, use DEPENDS keyword.
@isolov , this small change changes an explicit add_dependencies() to the DEPENDS option for tdaq_add_(library|executable). It has exactly the same effect under normal circumstances. In situations where we build a subset of packages and targets, this allows to disable certain targets from the build without an error message because add_dependencies() cannot find the targets.