Hello,
when I try to build (ENABLE_SHARED) an external module the compiling is fine until the TestDriver and the HeaderTest are compiled. They are looking for an itkORA.lib file that is not created in the itk/lib/Debug folder.
LNK1104 cannot open file 'C:\TK\ITK-413\msvc2015_64\lib\Debug\itkORA-4.13.lib' ORATestDriver
The src/CMakeList.txt is as follows:
set(ORA_SRCS
oraProjectionGeometry.cxx
oraStringTools.cxx
)
itk_module_add_library(ORA ${ORA_SRCS})
Nothing spectacular. ITK and VTK are compile with the same configurations. The *.dll files are created inside the itk build tree /bin/Debug/
directory. Inside the ORA-Build tree is neither a *.dll file nor a *.lib file.
In C:\TK\ITK-413\msvc2015_64\lib\cmake\ITK-4.13\Modules
a ORA.cmake
file is created:
set(ORA_LOADED 1)
set(ORA_ENABLE_SHARED "1")
set(ORA_DEPENDS "ITKCommon;ITKImageGrid;ITKImageSources;ITKVtkGlue;RTK")
set(ORA_PUBLIC_DEPENDS "ITKCommon;ITKImageGrid;ITKVtkGlue;RTK")
set(ORA_TRANSITIVE_DEPENDS "ITKCommon;ITKImageGrid;ITKImageSources;ITKVtkGlue;RTK")
set(ORA_PRIVATE_DEPENDS "")
set(ORA_LIBRARIES "ORA")
set(ORA_INCLUDE_DIRS "C:/TK/src/ora/include;C:/TK/ora/msvc2015_64/include")
set(ORA_LIBRARY_DIRS "")
set(ORA_RUNTIME_LIBRARY_DIRS "C:/TK/ITK-413/msvc2015_64/bin")
set(ORA_TARGETS_FILE "C:/TK/ITK-413/msvc2015_64/lib/cmake/ITK-4.13/Modules/Targets/ORATargets.cmake")
set(ORA_FACTORY_NAMES "")
The ORA_LIBRARIES
value is empty. Which module creates this file? I guess the missing library name is a hint. An earlier projects has a library name filled in.
What could be a reason for not generating a LIB file?
CMake generated another file in C:\TK\ITK-413\msvc2015_64\lib\cmake\ITK-4.13\Modules\Targets
:
ORATargets.cmake
# Generated by CMake
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5)
message(FATAL_ERROR "CMake >= 2.6.0 required")
endif()
cmake_policy(PUSH)
cmake_policy(VERSION 2.6)
#----------------------------------------------------------------
# Generated CMake target import file.
#----------------------------------------------------------------
# Commands may need to know the format version.
set(CMAKE_IMPORT_FILE_VERSION 1)
# Protect against multiple inclusion, which would fail when already imported targets are added once more.
set(_targetsDefined)
set(_targetsNotDefined)
set(_expectedTargets)
foreach(_expectedTarget ORA)
list(APPEND _expectedTargets ${_expectedTarget})
if(NOT TARGET ${_expectedTarget})
list(APPEND _targetsNotDefined ${_expectedTarget})
endif()
if(TARGET ${_expectedTarget})
list(APPEND _targetsDefined ${_expectedTarget})
endif()
endforeach()
if("${_targetsDefined}" STREQUAL "${_expectedTargets}")
unset(_targetsDefined)
unset(_targetsNotDefined)
unset(_expectedTargets)
set(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP)
return()
endif()
if(NOT "${_targetsDefined}" STREQUAL "")
message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n")
endif()
unset(_targetsDefined)
unset(_targetsNotDefined)
unset(_expectedTargets)
# Create imported target ORA
add_library(ORA SHARED IMPORTED)
set_target_properties(ORA PROPERTIES
INTERFACE_LINK_LIBRARIES "ITKCommon;ITKCommon;ITKStatistics;ITKTransform;ITKVtkGlue;RTK"
)
# Import target "ORA" for configuration "Debug"
set_property(TARGET ORA APPEND PROPERTY IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(ORA PROPERTIES
IMPORTED_IMPLIB_DEBUG "C:/TK/ITK-413/msvc2015_64/lib/Debug/itkORA-4.13.lib"
IMPORTED_LOCATION_DEBUG "C:/TK/ITK-413/msvc2015_64/bin/Debug/itkORA-4.13.dll"
)
# Import target "ORA" for configuration "Release"
set_property(TARGET ORA APPEND PROPERTY IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(ORA PROPERTIES
IMPORTED_IMPLIB_RELEASE "C:/TK/ITK-413/msvc2015_64/lib/Release/itkORA-4.13.lib"
IMPORTED_LOCATION_RELEASE "C:/TK/ITK-413/msvc2015_64/bin/Release/itkORA-4.13.dll"
)
# Import target "ORA" for configuration "MinSizeRel"
set_property(TARGET ORA APPEND PROPERTY IMPORTED_CONFIGURATIONS MINSIZEREL)
set_target_properties(ORA PROPERTIES
IMPORTED_IMPLIB_MINSIZEREL "C:/TK/ITK-413/msvc2015_64/lib/MinSizeRel/itkORA-4.13.lib"
IMPORTED_LOCATION_MINSIZEREL "C:/TK/ITK-413/msvc2015_64/bin/MinSizeRel/itkORA-4.13.dll"
)
# Import target "ORA" for configuration "RelWithDebInfo"
set_property(TARGET ORA APPEND PROPERTY IMPORTED_CONFIGURATIONS RELWITHDEBINFO)
set_target_properties(ORA PROPERTIES
IMPORTED_IMPLIB_RELWITHDEBINFO "C:/TK/ITK-413/msvc2015_64/lib/RelWithDebInfo/itkORA-4.13.lib"
IMPORTED_LOCATION_RELWITHDEBINFO "C:/TK/ITK-413/msvc2015_64/bin/RelWithDebInfo/itkORA-4.13.dll"
)
# This file does not depend on other imported targets which have
# been exported from the same project but in a separate export set.
# Commands beyond this point should not need to know the version.
set(CMAKE_IMPORT_FILE_VERSION)
cmake_policy(POP)
That seems to be without any problems.