I'm using VS 2019 to compile a qt project. The compilation runs well, but when I start the executable, I'm getting error messages about missing Qt dlls. I understand this is fixed with adding path to the dlls to the PATH environment variable, but in VS normal project, you can modify program starting environment so that you don't have to make the modifications system-wide. This works for VS normal projects, but how do I make it work for cmake projects?
Asked
Active
Viewed 247 times
0
-
I would use the native MSVS format "NMake" (in preference to "CMake") if at all possible! – paulsm4 Oct 12 '20 at 01:58
-
1You don't really do this at the CMake stage, although I expect you could generate a .user file that Visual Studio could apply. In my usage I use CMake scripting to copy the .dlls in the same folder as the executable – drescherjm Oct 12 '20 at 02:01
-
@drescherjm I know the issue as well as the solutions with copying the DLLs or manually editing the generated project but _although I expect you could generate a .user file that Visual Studio could apply_ That's an idea I was not aware of: just write a CMake function which patches (or adds something to) the generated VS solution / project. If you could demonstrate this in an answer I would consider this as _valuable_. ;-) – Scheff's Cat Oct 12 '20 at 06:03