<span class="Apple-style-span" style="font-family: arial, sans-serif; font-size: 13px; border-collapse: collapse; ">if(BUILD_PARAVIEW_PLUGIN==ON)</span><div><span class="Apple-style-span" style="font-size: 13px; "></span><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;">  should just be</span></font></div>
<div><font class="Apple-style-span" face="arial, sans-serif"><span class="Apple-style-span" style="border-collapse: collapse;"><span class="Apple-style-span" style="font-size: 13px; ">if(BUILD_PARAVIEW_PLUGIN)</span><br></span></font><br>
</div><div>cmake --help-command IF</div><div>will explain...</div><div><br></div><div>There is no &quot;==&quot; but there are EQUAL and STREQUAL operators. In the case of a boolean option variable, the syntax &quot;if(variable)&quot; if preferred.</div>
<div><br></div><div><br></div><div>HTH,</div><div>David</div><div><br><div class="gmail_quote"><br></div><div class="gmail_quote">On Sun, Nov 29, 2009 at 9:10 AM, David Doria <span dir="ltr">&lt;<a href="mailto:daviddoria@gmail.com">daviddoria@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">I am packaging a VTK filter. I am trying to give the user the option<br>
of additionally compiling the Paraview plugin for the filter (in the<br>
.../plugin directory). I wanted to make a BUILD_PARAVIEW_PLUGIN<br>
variable that they could set to &quot;ON&quot; or &quot;OFF&quot;. If it is set to &quot;ON&quot;,<br>
CMake should proceed with processing the plugin subdirectory. Else,<br>
just ignore it. However, when I generate the makefiles in both cases,<br>
they seem to be the same and neither includes the plugin subdirectory.<br>
<br>
Can anyone see where I have gone wrong?<br>
<br>
My main CMakeLists.txt file is:<br>
------------------------------<br>
cmake_minimum_required(VERSION 2.6)<br>
    if(COMMAND cmake_policy)<br>
      cmake_policy(SET CMP0003 NEW)<br>
    endif(COMMAND cmake_policy)<br>
<br>
PROJECT(vtkPointSetOutlierRemoval)<br>
<br>
FIND_PACKAGE(VTK REQUIRED)<br>
INCLUDE(${VTK_USE_FILE})<br>
<br>
SET(BUILD_PARAVIEW_PLUGIN ON CACHE STRING &quot;Build Paraview plugin?&quot; FORCE)<br>
<br>
if(BUILD_PARAVIEW_PLUGIN==ON)<br>
 ADD_SUBDIRECTORY(plugin)<br>
endif(BUILD_PARAVIEW_PLUGIN==ON)<br>
<br>
ADD_EXECUTABLE(vtkPointSetOutlierRemoval Example.cxx<br>
vtkPointSetOutlierRemoval.cxx)<br>
TARGET_LINK_LIBRARIES(vtkPointSetOutlierRemoval vtkHybrid )<br>
<br>
-------------------------------<br>
And the plugin subdirectory CMakeLists.txt file is:<br>
<br>
FIND_PACKAGE(ParaView REQUIRED)<br>
INCLUDE(${PARAVIEW_USE_FILE})<br>
<br>
ADD_PARAVIEW_PLUGIN(PointSetOutlierRemoval &quot;1.0&quot;<br>
  SERVER_MANAGER_XML PointSetOutlierRemoval.xml<br>
SERVER_MANAGER_SOURCES ../vtkPointSetOutlierRemoval.cxx<br>
)<br>
<br>
<br>
Thanks,<br>
<br>
David<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the CMake FAQ at: <a href="http://www.cmake.org/Wiki/CMake_FAQ" target="_blank">http://www.cmake.org/Wiki/CMake_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.cmake.org/mailman/listinfo/cmake" target="_blank">http://www.cmake.org/mailman/listinfo/cmake</a><br>
</blockquote></div><br></div>