We are building an executable with the visual studio compiler.
When deploying we want to include the msvc redist dll’s as customers might not have installed them.
Furthermore, we do not want to use those located in system32 on our CI and developer PC’s but want to use a fetched copy we store in a company repo.
I currently discovered
file(GET_RUNTIME_DEPENDENCIES and am able to use it to find and install all but the system DLL’s with the regex:
Also, I was able to copy the redist DLL’s with the regex:
POST_INCLUDE_REGEXES ".*msvcp.*" ".*vccorlib.*" ".*vcruntime.*" ".*concrt.*" ".*ucrtbase.*".
But I cannot find a way to let the tool find the redist DLL’s in the given
DIRECTORIES instead of system32.
The search order of the method cannot be changed as far as I can tell, but maybe there is some workaround?