New generator expression $<TARGET_RUNTIME_DLL_PATHS:tgt> ?

Hi,

I’m thinking about adding a new generator expression to make it easier to collect the directory necessary to find all dlls, and to use it then e.g. to generate a bat file or to set the VS_DEBUGGER_ENVIRONMENT target property.
https://gitlab.kitware.com/neundorf/cmake/-/commit/388b6812acf8f93d7b0ecbd88551867c75ffd4b2

What do you think ? Comments ?

Alex

1 Like

Sure, I think that makes sense. It would be in a similar vain to the $<TARGET_RUNTIME_DLLS> genex.

Should I filter out some default directories, because they are searched anyway ? If yes, I guess there’s some cmake variable which contains those system directories ?

No, let’s just have it add the directory for every entry in $<TARGET_RUNTIME_DLLS>. Maybe we could filter out duplicates.

Ok, the code in the branch already skips duplicates.
Is TARGET_RUNTIME_DLL_PATHS a good name, or would TARGET_RUNTIME_DLL_DIRS be better ?
Or some other name ?

Your suggestion is exactly what I was looking for reading up the generator expressions available to populate VS_DEBUGGER_ENVIRONMENT on test executables. :clap:

Can’t wait to see this in a release!

(Regarding names, I like the suggested TARGET_RUNTIME_DLL_PATHS)

It should be in 3.27, TARGET_RUNTIME_DLL_DIRS.