How to get a list of files to be installed when installing the CMake component
Is there a way to find out programmatically (in cmake) which files will be installed if the COMPONENT component is installed (something like the get_property component)?
I am currently setting COMPONENT to a temporary packaging location (not using CPack for packaging) and then using custom commands. Calling the following command while packaging in Cmake.
cmake -DCOMPONENT=my_test_component
-DCMAKE_INSTALL_PREFIX=${TMP_PACKAGING_ROOT}
-P ${CMAKE_BINARY_DIR}/cmake_install.cmake
I wanted to know if it is possible to get a list of files so that I can only include those files in the package? or perhaps add them as outputs to a custom command?
+3
source to share