Build and install ITK in any configuration but make sure not to use an external/system Eigen dependency.
When any project tries to find the installed ITK, for example with find_package(ITK 5.4 REQUIRED), a CMake error occurs:
CMake Error at D:/ITK-install/lib/cmake/ITK-5.4/Modules/ITKEigen3.cmake:16 (find_package):
Could not find a package configuration file provided by "ITKInternalEigen3"
(requested version 3.3) with any of the following names:
ITKInternalEigen3Config.cmake
itkinternaleigen3-config.cmake
Add the installation prefix of "ITKInternalEigen3" to CMAKE_PREFIX_PATH or
set "ITKInternalEigen3_DIR" to a directory containing one of the above
files. If "ITKInternalEigen3" provides a separate development package or
SDK, be sure it has been installed.
Call Stack (most recent call first):
D:/ITK-install/lib/cmake/ITK-5.4/ITKModuleAPI.cmake:86 (include)
D:/ITK-install/lib/cmake/ITK-5.4/ITKModuleAPI.cmake:31 (itk_module_load)
D:/ITK-install/lib/cmake/ITK-5.4/ITKModuleAPI.cmake:143 (_itk_module_config_recurse)
D:/ITK-install/lib/cmake/ITK-5.4/ITKConfig.cmake:88 (itk_module_config)
CMakeLists.txt:5 (find_package)
The <INSTALL_DIR>/lib/cmake/ITK-5.4/Modules directory contains an ITKEigen3.cmake file, with the following content at the end:
set(ITK_USE_SYSTEM_EIGEN "OFF")
set(ITKInternalEigen3_DIR "${ITK_MODULES_DIR}")
find_package(ITKInternalEigen3 3.3 REQUIRED CONFIG)
However, ITKInternalEigen3 is not installed by ITK and only present in the build directory.
Build and install ITK in any configuration but make sure not to use an external/system Eigen dependency.
When any project tries to find the installed ITK, for example with
find_package(ITK 5.4 REQUIRED), a CMake error occurs:The
<INSTALL_DIR>/lib/cmake/ITK-5.4/Modulesdirectory contains anITKEigen3.cmakefile, with the following content at the end:However, ITKInternalEigen3 is not installed by ITK and only present in the build directory.