ITKCudaCommon automatic linking error

Hi,

I’m trying to update a script that was once linked to RTK module directly (around 1.4).
I linked against my 5.2 build with only one issue: ITKCudaCommon seems to be referred to without relative path to build\lib\Release. The rest of the components are correctly linked and if I manually add the build\lib\Release\ path the program compiles fine. Have you got any idea of why this would happen?

I’m including my CMakeLists. My ITK version was compiled statically with RTK module ON and also wrapped to Python.

cmake_minimum_required(VERSION 3.10)

 project(gRTKRecon)
  
 find_package(ITK REQUIRED COMPONENTS RTK ITKCudaCommon)
 include(${ITK_USE_FILE})
  
 add_executable(gRTKRecon ${PROJECT_SOURCE_DIR}/gRTKRecon.cpp {PROJECT_SOURCE_DIR}/gRTKFDK.cpp ${PROJECT_SOURCE_DIR}/gRTKFDK.h)
 
 if( "${ITK_VERSION_MAJOR}" LESS 4 )
   target_link_libraries(gRTKRecon ITKReview ${ITK_LIBRARIES})
 else( "${ITK_VERSION_MAJOR}" LESS 4 )
   target_link_libraries(gRTKRecon ${ITK_LIBRARIES})
 endif( "${ITK_VERSION_MAJOR}" LESS 4 )
 
 
 TARGET_LINK_LIBRARIES(gRTKRecon ${RTK_LIBRARIES})
1 Like

Hi,
ITKCudaCommon is not an idependent module yet. If you use the current RTK master, I would not include it in the find_package command. We are refactoring it to make it independent (see GitHub - SimonRit/ITKCudaCommon) but this is not ready yet.
Regarding ITKCudaCommon targets, @LucasGandel is working on it, maybe he already has a solution for this?
Simon

3 Likes