We have a set of configuration files located in a common location that multiple target rely on at runtime.
The structure looks something like this;
Both targetA and targetB depend on config.xml and config.ini. TargetC does not depend on the files.
What is the preferred way using CMake to install the resource given the above mentioned dependencies?
- add CMakeLists.txt to common folder and install files from there. Do not like this option as this means I always install the files regardless of which target I want to install (targetC does not require does files).
- add install rules to targetA/CMakeLists.txt and targetB/CMakeLists.txt. This is a better option but still requires same logic in multiple files.