error building an external module: cannot open input file 'ITKCommon.lib'

ebennink
Thu, 11 Oct 2018 14:14:57 +0000
Engineering

Dear all,

I am trying to build an external ITK module, but linking the new module to the ITK libraries fails. It appears that CMake added the dependent ITK libraries as ITKCommon.lib and ITKSpatialObjects.lib to the link command, whereas these should have had the ITK version number included, i.e. ITKCommon-4.13.lib and ITKSpatialObjects-4.13.lib.

I am using ITK 4.13, built in Release mode and BUILD_SHARED_LIBS=ON. Windows 10, MSVC 2015, CMake version 3.10.2.

My itk-module.cmake looks like:

get_filename_component(MY_CURRENT_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
file(READ "${MY_CURRENT_DIR}/README.rst" DOCUMENTATION)

itk_module(IsiToolkitLabelModule
  DEPENDS
    ITKCommon
	ITKSpatialObjects
  DESCRIPTION
    "${DOCUMENTATION}"
  EXCLUDE_FROM_DEFAULT
  ENABLE_SHARED
)

Any thoughts on what could go wrong?

Cheers,
Edwin

13 posts - 4 participants