How would one go about gathering all the shared libraries (.dll
's) for a given target and making sure they’re copied into its runtime/output directory?
As an example, see the diagram below.
executable
├── shared_lib
├── static_lib1
│ └── shared_lib
└── static_lib2
Note: some of these shared libraries are not built by the project, they’re installed on the machine and located with find_package
.
The way I’ve solved for this was to write some recursive functions and cmake scripts for a custom target. I feel like there has to be something I’m missing. Any suggestions?