Page MenuHomePhabricator | MITK

mitk_create_module PACKAGE_DEPENDS cannot handle target namespaces
Open, NormalPublic

Description

If I add cpprestsdk|cpprest to the PACKAGE_DEPENDS of a module, the properties of the cpprestsdk::cpprest target are not respected, i.e. the module is not linked against the library, leading to unresolved symbol linker errors. However, if I do it in plain CMake, it works:

if(TARGET ${MODULE_TARGET})
   target_link_libraries(${MODULE_TARGET} PRIVATE cpprestsdk::cpprest)
 endif()

I guess we have to look into the mitkFunctionCreateModule.cmake and mitkFunctionUseModules.cmake files and fix something related to "target namespaces".

Event Timeline

kislinsk created this task.Mar 14 2019, 9:36 AM
kislinsk triaged this task as Normal priority.