0

I'm trying to make a new project using ITK and VTK. I've created a new directory with the src and bin sub directories and created the Cmakelists.txt and .cxx files accordingly to ITK own guide intructions. However, when i try to configure using cMake, i get this warning stating that the file ITKconfig.cmake could not be found even though i have it on the path i added manually as you can see on the image.

CMAKE warning and file path

What am i doing wrong here? Really want to start working on my project but i need to have it created first. Thanks in advance

  • 1
    The warning message you got tells about `ITK_DIR` variable. But you set `ITK` one... – Tsyvarev Apr 20 '18 at 22:50
  • I tried changing the ITK_DIR to the same path but when i do so, it gives me an error stating that it could not find load file. – Bruno Santos Apr 20 '18 at 23:07
  • So it will be the next problem. Actually, I found strange that "Config" file is located under `CMakeFiles` directory: normally, here are *intermediate* files. If you think this "Config" describes your VTK *installation*, then you definitely do something wrong - you need file under *installation prefix*, not under build directory. It could be that given "Config" file describes build directory of VTK, but again, I found this location being strange. – Tsyvarev Apr 20 '18 at 23:13
  • Some basic background how CMake tries to find libraries: https://stackoverflow.com/a/41909627/2799037. You have to ammend the paths to VTK and ITK to CMAKE_PREFIX_PATH. – usr1234567 Apr 22 '18 at 11:22

1 Answers1

0

It looks like you should set ITK_DIR to C:/itk/bin (judging by how you organize source and build folders).

Dženan
  • 3,329
  • 3
  • 31
  • 44
  • I have ITKConfig.cmake in 3 locations: `C:\Dev\ITK-2017\ITKConfig.cmake`, `C:\Dev\ITK-2017\CMakeFiles\ITKConfig.cmake` and `C:\Dev\ITK-2017\CMakeTmp\ITKConfig.cmake`. And I point `ITK_DIR` to `C:/Dev/ITK-2017`. – Dženan Apr 24 '18 at 13:40