Linking itk with an external project

Hi,

I built the latest version of itk using CMake. After configuring my CMakeLists.txt file in as per the instructions online for an external project, I am still getting this error - cannot open source file “itkImage.h”. Could someone please help me in sorting out this issue?
CMakeLists.txt (479 Bytes)

Your CMakeLists.txt looks correct. Can you share your new.cpp as well? And copy-paste the exact compiler error message?

It is a blank code with just the header files. These are
the errors that I am getting.
fatal error: itkImage.h: No such file or directory
fatal error: itkOpenCVImageBridge.h: No such file or directory

Can you share your project’s CMakeCache.txt?

CMakeCache.txt (18.6 KB)

The only ITK-related content there is:

//The directory containing a CMake configuration file for ITK.
ITK_DIR:PATH=/usr/local/lib/cmake/ITK-5.2

My only conclusion is that your ITK installation is somehow broken. On my computer, for ITKConfig.cmake installed in C:\Dev\PlusGit\andor64\itk-int\lib\cmake\ITK-5.1, itkImage.h is in C:\Dev\PlusGit\andor64\itk-int\include\ITK-5.1. How does your ITKConfig.cmake look like, and can you find itkImage.h in corresponding location?