<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi Sergio,<br>
<br>
inter-plugin dependencies are stated in the
"manifest_headers.cmake" file in the plug-in folder, using the
"Require-Plugin" header. If this file exists in your plug-in (it
is optional), please check its contents.<br>
<br>
Your CMake code below looks correct.<br>
<br>
- Sascha<br>
<br>
On 12/18/2012 11:17 AM, Sergio Vera wrote:<br>
</div>
<blockquote
cite="mid:CAD1Tg9T-nZN4a2UW6vA_xXBYNYr-D39drCiGA+ChvXsz2co+pQ@mail.gmail.com"
type="cite">
<div dir="ltr">Hello!
<div><br>
</div>
<div>I'm following the tutorial on the CTK website, but I'm
having problems with plugin dependencies cycles</div>
<div><br>
</div>
<div>I have a Top level CMakeLists.txt<br clear="all">
<div><br>
</div>
<div>
<div><font face="courier new, monospace">cmake_minimum_required(VERSION
2.8)</font></div>
<div><font face="courier new, monospace">PROJECT(CoreApp)</font></div>
<div><font face="courier new, monospace"><br>
</font></div>
<div><font face="courier new, monospace">FIND_PACKAGE(Qt4
REQUIRED)</font></div>
<div><font face="courier new, monospace">INCLUDE(${QT_USE_FILE})
# include UseQt4.cmake</font></div>
<div><font face="courier new, monospace">FIND_PACKAGE(CTK
REQUIRED)</font></div>
<div><font face="courier new, monospace">INCLUDE(${CTK_USE_FILE})
# include UseCTK.cmake</font></div>
<div><font face="courier new, monospace"><br>
</font></div>
<div><font face="courier new, monospace">macro(GetMyTargetLibraries
all_target_libraries varname)</font></div>
<div><font face="courier new, monospace"> set(re_ctkplugin
"^com_alma_[a-zA-Z0-9_]+$")</font></div>
<div><font face="courier new, monospace"> set(_tmp_list)</font></div>
<div><font face="courier new, monospace"> list(APPEND
_tmp_list ${all_target_libraries})</font></div>
<div><font face="courier new, monospace">
ctkMacroListFilter(_tmp_list re_ctkplugin
OUTPUT_VARIABLE ${varname})</font></div>
<div><font face="courier new, monospace">endmacro()</font></div>
<div><font face="courier new, monospace"><br>
</font></div>
<div><font face="courier new, monospace">set(plugins</font></div>
<div><font face="courier new, monospace">
Plugins/com.alma.rd.trackerlistenerservice:ON</font></div>
<div><font face="courier new, monospace">)</font></div>
<div><font face="courier new, monospace">ctkMacroSetupPlugins(${plugins})</font></div>
<div><font face="courier new, monospace">add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/CoreApps)</font><br>
</div>
</div>
<div><br>
</div>
<div style="">
and inside a Plugins/com.alma.rd.trackerlistenerservice
folter I have another CMakeLists.txt</div>
<div style=""><font face="courier new, monospace"><br>
</font></div>
<div style="">
<div><font face="courier new, monospace">PROJECT(com_alma_rd_trackerlistenerservice)</font></div>
<div><font face="courier new, monospace">set(PLUGIN_export_directive
"com_alma_rd_trackerlistenerservice_EXPORT")</font></div>
<div><font face="courier new, monospace"><br>
</font></div>
<div><font face="courier new, monospace"># No OpenIGTLink
yet</font></div>
<div><font face="courier new, monospace"><br>
</font></div>
<div><font face="courier new, monospace">set(PLUGIN_SRCS</font></div>
<div><font face="courier new, monospace">
TrackerListenerService.cpp</font></div>
<div><font face="courier new, monospace">)</font></div>
<div><font face="courier new, monospace"># Files which
should be processed by Qts moc</font></div>
<div><font face="courier new, monospace">set(PLUGIN_MOC_SRCS</font></div>
<div><font face="courier new, monospace">)</font></div>
<div><font face="courier new, monospace"># Qt Designer files
which should be processed by Qts uic</font></div>
<div><font face="courier new, monospace">set(PLUGIN_UI_FORMS</font></div>
<div><font face="courier new, monospace">)</font></div>
<div><font face="courier new, monospace"># QRC Files which
should be compiled into the plugin</font></div>
<div><font face="courier new, monospace">set(PLUGIN_resources</font></div>
<div><font face="courier new, monospace">)</font></div>
<div><font face="courier new, monospace">#Compute the plugin
dependencies</font></div>
<div><font face="courier new, monospace">ctkFunctionGetTargetLibraries(PLUGIN_target_libraries)</font></div>
<div><font face="courier new, monospace">ctkMacroBuildPlugin(</font></div>
<div><font face="courier new, monospace"> NAME
${PROJECT_NAME}</font></div>
<div><font face="courier new, monospace"> EXPORT_DIRECTIVE
${PLUGIN_export_directive}</font></div>
<div><font face="courier new, monospace"> SRCS
${PLUGIN_SRCS}</font></div>
<div><font face="courier new, monospace"> MOC_SRCS
${PLUGIN_MOC_SRCS}</font></div>
<div><font face="courier new, monospace"> UI_FORMS
${PLUGIN_UI_FORMS}</font></div>
<div><font face="courier new, monospace"> RESOURCES
${PLUGIN_resources}</font></div>
<div><font face="courier new, monospace"> TARGET_LIBRARIES
${PLUGIN_target_libraries}</font></div>
</div>
<div style=""><br>
</div>
<div style="">and a target_libraroes.cmake with:</div>
<div style=""><br>
</div>
<div style="">
<div><font face="courier new, monospace">set(target_libraries</font></div>
<div><font face="courier new, monospace"><span class=""
style="white-space:pre"> </span>CTKPluginFrameWork</font></div>
<div><font face="courier new, monospace"> )</font></div>
<div><br>
</div>
<div style="">after using Cmake-GUI on the top level
CmakeLists.txt i obtain the following error:</div>
<div style=""><br>
</div>
<div style="">
<p style="margin:0px">Generated:
C:/work/pruebas-bin/CTKTest/DGraphInput-alldep-withext.txt</p>
<p style="margin:0px"><span style="color:rgb(255,0,0)">CMake
Error at
C:/work/src/CTK/CMake/ctkMacroValidateBuildOptions.cmake:138
(message):</span></p>
<p style="margin:0px"><span style="color:rgb(255,0,0)">
Failed to obtain dependence path of
com_alma_rd_trackerlistenerservice.</span></p>
<p style="margin:0px"><span style="color:rgb(255,0,0)"> 1</span></p>
<p style="margin:0px"><span style="color:rgb(255,0,0)"> </span></p>
<p style="margin:0px"><span style="color:rgb(255,0,0)">
Cycle detected !</span></p>
<p style="margin:0px"><span style="color:rgb(255,0,0)">
com_alma_rd_trackerlistenerservice</span></p>
<p style="margin:0px"><span style="color:rgb(255,0,0)">
com_alma_rd_trackerlistenerservice</span></p>
<p style="margin:0px"><span style="color:rgb(255,0,0)">Call
Stack (most recent call first):</span></p>
<p style="margin:0px"><span style="color:rgb(255,0,0)">
C:/work/src/CTK/CMake/ctkMacroSetupPlugins.cmake:186
(ctkMacroValidateBuildOptions)</span></p>
<p style="margin:0px"><span style="color:rgb(255,0,0)">
CMakeLists.txt:24 (ctkMacroSetupPlugins)</span></p>
<p style="margin:0px">Configuring incomplete, errors
occurred!</p>
<p style="margin:0px"><br>
</p>
<p style="margin:0px">it seems that the plugins thinks
that it depends on itself. Perhaps is a problem with
the GetMyTargetLibraries macro?</p>
<p style="margin:0px"><br>
</p>
<p style="margin:0px">Any help will be highly appreciated</p>
<p style="margin:0px"><br>
</p>
<p style="margin:0px">many thanks.</p>
<p style="margin:0px"><br>
</p>
</div>
</div>
-- <br>
Sergio Vera<br>
<br>
Alma IT Systems<br>
C/ Vilana, 4B, 4º 1ª<br>
08022 Barcelona<br>
T. (+34) 932 380 592<br>
<a moz-do-not-send="true" href="http://www.alma3d.com">www.alma3d.com</a><br>
</div>
</div>
</blockquote>
<br>
</body>
</html>