Your CMakeLists.txt specifies what library or executable is being built and where it is going to be located. This is the place where you can add this information to “some variable”, e.g. a list of all libraries/executables that you are building. Towards the end of the CMakeLists.txt (i.e. after all libraries/executables are defined) you can advise cmake to call installation code (using install(CODE …)) at install time. This code would then evaluate the content of the “variable” and gather all depencies using file(GET_RUNTIME_DEPENCIES …). Works for me although I do not like my “global variable”. I also have problems with file (INSTALL …) and symbolic links on windows, but this is another story.