Dependent extension vtkSlicerMarkupsModuleMRML cannot be found by CMake

Hi,

I try to build a loadable module which need a vtkMRMLMarkupsFiducialNode. I have a linker error during the build. I think the problem is related with the following warning:

Dependent extension vtkSlicerMarkupsModuleMRML cannot be found by CMake
find_package(), therefore paths variables cannot be imported from this
extension. The problem can be resolved by generating
vtkSlicerMarkupsModuleMRMLConfig.cmake by adding
include(${Slicer_EXTENSION_GENERATE_CONFIG}) to the top-level
CMakeLists.txt of the dependent extension.

The problem is include(${Slicer_EXTENSION_GENERATE_CONFIG}) is present in the top-level CMakeLists and I cannot find any vtkSlicerMarkupsModuleMRMLConfig.cmake file. Any idea on how to solve it ?

Many thanks !

In case of a linking problem i think you must add MRMLMarkups library to the CMakeLists.txt where you want to use markup nodes:

For example if you are going to use markups in logic, then in Logic directory CMakeLists.txt

set(${KIT}_TARGET_LIBRARIES
...
vtkSlicerMarkupsModuleMRML
...
)

2 Likes