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 
-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?


source to share

1 answer

The only way to find out, apparently, is to read the file install_manifest _ $ {component} .txt, which will contain the entire list of files that will be installed when installing the cmake component.



All Articles