I have requirement to create different targets for different group of python files in my project. Any target can be dependent on one or more set of targets.
During, make install the files associated with specific targets, shall be copied to some build folder path. I know that we can copy the python files explicitly with below command.
install(FILES file1.py DESTINATION ${BUILD_FILES_INSTALL_PATH}
but, I can not give list of file explicitly with my requirement. Is there a way to install python files with target(for group of python files) name in install (or any other CMake) command?
For example: if there are 2 targets - target1, target2 (both for different set of python files)
I created the target for specific python files with below commands:
add_custom_target(target1 DEPENDS file1.py file2.py)
add_custom_target(target2 DEPENDS file3.py)
target1 has dependency on target2
So, during make install, is there any way to copy python files associated with target1 (and target2 as target1 has dependency on target2) with just giving target1 in install command?
Thank you.