[Ctk-developers] CTK-Plugins Cycle dependencing detected

Sergio Vera sergio.vera at alma3d.com
Tue Dec 18 10:17:46 UTC 2012


Hello!

I'm following the tutorial on the CTK website, but I'm having problems with
plugin dependencies cycles

I have a Top level CMakeLists.txt

cmake_minimum_required(VERSION 2.8)
PROJECT(CoreApp)

FIND_PACKAGE(Qt4 REQUIRED)
INCLUDE(${QT_USE_FILE})  # include UseQt4.cmake
FIND_PACKAGE(CTK REQUIRED)
INCLUDE(${CTK_USE_FILE}) # include UseCTK.cmake

macro(GetMyTargetLibraries all_target_libraries varname)
  set(re_ctkplugin "^com_alma_[a-zA-Z0-9_]+$")
  set(_tmp_list)
  list(APPEND _tmp_list ${all_target_libraries})
  ctkMacroListFilter(_tmp_list re_ctkplugin OUTPUT_VARIABLE ${varname})
endmacro()

set(plugins
  Plugins/com.alma.rd.trackerlistenerservice:ON
)
ctkMacroSetupPlugins(${plugins})
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/CoreApps)

and inside a Plugins/com.alma.rd.trackerlistenerservice folter I have
another CMakeLists.txt

PROJECT(com_alma_rd_trackerlistenerservice)
set(PLUGIN_export_directive "com_alma_rd_trackerlistenerservice_EXPORT")

# No OpenIGTLink yet

set(PLUGIN_SRCS
  TrackerListenerService.cpp
)
# Files which should be processed by Qts moc
set(PLUGIN_MOC_SRCS
)
# Qt Designer files which should be processed by Qts uic
set(PLUGIN_UI_FORMS
)
# QRC Files which should be compiled into the plugin
set(PLUGIN_resources
)
#Compute the plugin dependencies
ctkFunctionGetTargetLibraries(PLUGIN_target_libraries)
ctkMacroBuildPlugin(
  NAME ${PROJECT_NAME}
  EXPORT_DIRECTIVE ${PLUGIN_export_directive}
  SRCS ${PLUGIN_SRCS}
  MOC_SRCS ${PLUGIN_MOC_SRCS}
  UI_FORMS ${PLUGIN_UI_FORMS}
  RESOURCES ${PLUGIN_resources}
  TARGET_LIBRARIES ${PLUGIN_target_libraries}

and a target_libraroes.cmake with:

set(target_libraries
CTKPluginFrameWork
  )

after using Cmake-GUI on the top level CmakeLists.txt i obtain the
following error:

Generated: C:/work/pruebas-bin/CTKTest/DGraphInput-alldep-withext.txt

CMake Error at C:/work/src/CTK/CMake/ctkMacroValidateBuildOptions.cmake:138
(message):

Failed to obtain dependence path of com_alma_rd_trackerlistenerservice.

 1

  Cycle detected !

 com_alma_rd_trackerlistenerservice

 com_alma_rd_trackerlistenerservice

Call Stack (most recent call first):

C:/work/src/CTK/CMake/ctkMacroSetupPlugins.cmake:186
(ctkMacroValidateBuildOptions)

CMakeLists.txt:24 (ctkMacroSetupPlugins)

 Configuring incomplete, errors occurred!


it seems that the plugins thinks that it depends on itself. Perhaps is a
problem with the GetMyTargetLibraries macro?


Any help will be highly appreciated


many thanks.


-- 
Sergio Vera

 Alma IT Systems
 C/ Vilana, 4B, 4º 1ª
 08022 Barcelona
 T. (+34) 932 380 592
 www.alma3d.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/ctk-developers/attachments/20121218/e1776793/attachment.htm>


More information about the Ctk-developers mailing list