<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /></head><body style='font-size: 10pt'>
<div class="message-partheaders">I have a couple of custom VTK filters. They are hacked into the VTK sources by adding them to the CMakeList of the existing General Filters module and built along with the entire VTK library. I use the resulting filters both in Paraview (shared libs), and in a little executable (static libs).</div>
<div id="message-htmlpart2" class="message-htmlpart">
<div class="rcmBody">
<p>I assume I should be able to make VTK as is, then build my filters separately into a new library. But I can't figure out how to set up the CMakelist so the library can be built separately. Every example I can find for custom VTK filters builds them directly into an executable, not a library.</p>
<p>Am I supposed to be doing this as a VTK Remote Module? But there is nothing published in a journal, and I am not trying to share it with anyone.</p>
<p>Am I supposed to put them in as a Third-party submodule? But then they would still build along with the full VTK build.</p>
<p>Here is the attempted CMakeList, which produces the error: "Unknown CMake command "vtk_module_library".</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; margin: 0">
<p>find_package(VTK REQUIRED)<br />include(${VTK_USE_FILE})<br /><br />set(Module_SRCS<br />ModelReduce.cxx<br />)</p>
<p>configure_file(<br />${CMAKE_CURRENT_SOURCE_DIR}/ModelReduceExport.h.in<br />${CMAKE_CURRENT_BINARY_DIR}/ModelReduceExport.h<br />)</p>
<p>vtk_module_library(vtkModelReduce ${Module_SRCS})</p>
</blockquote>
</div>
</div>

</body></html>