Skip to content

ITKInternalEigen3 not installed when using CMake 3.28.0 | 3.28.1 downloaded from CMake releases (reproduced in Windows) #4407

Description

@kislinsk

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.

Metadata

Metadata

Assignees

Labels

status:BlockedBlocked by some other issue which needs to be resolved first or by some other causestatus:ConfirmedConfirmed/reproduced issue on a different machine with same or similar settings to those reportedtype:BugInconsistencies or issues which will cause an incorrect result under some or all circumstances

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions