When i try to launch a test, a message box open to inform me that some .dll are missing.
I have set ass system variables path %VTK_DIR%/bin. (I work on windows with visual studio community) but it look like cmake do not go to search into this path variable.
I tried to message($env{PATH}) to see what path contains and i found that the path variable return from cmake is totally difference from the one that i setup in my environnement variables from windows. It’s look like more link to visual studio than windows. (Yes I’m also beginner with cmake.)
As i don’t want to copy all the bin directory to my project i would like to setup properly my cmake to go to search into the good directory.
The VTK_DIR value you have set points to the files cmake needs inside the VTK install, but not the DLLs. Looks like they will be in “C:/vtk/VTK-9.2.6-install/bin” - try adding that to your path.
Also, how are you launching a test? That may affect how env-vars like PATH are set.
HTH,
Aron
Yes sorry i didn’t mention but in my cmake VTK_DIR point to cmake config files but in my windows environnement variable VTK_DIR point to C:/vtk/VTK-9.2.6-install/.
So in path when i set up %VTK_DIR%/bin the valeur should be C:/vtk/VTK-9.2.6-install/bin.
I launch my test via visual studio. I just select the executable file main and launch it.
How can i specify to cmake to check the system environnement variables and not the one from visual studio?
I don’t think cmake is involved - it’s just building your app, and that’s been done already.
If you launch the test inside VS, then VS is controlling the environment. I think you want to look at the Debug menu, and the config Debug Properties item at the bottom - the VC++ Directories … Executable Directories entry gives you control of the PATH.