<div dir="ltr"><div dir="ltr"><div dir="ltr">Hi Utkarsh,<div><br></div><div>The following MR will address some of the issues:</div><div><a href="https://gitlab.kitware.com/vtk/vtk/merge_requests/3075">https://gitlab.kitware.com/vtk/vtk/merge_requests/3075</a><br></div><div><br></div><div>Relevant changes the MR are:</div><div>1) The VTK Python extension modules are exported as targets.</div><div>2) When an extension module is imported, it imports the extension modules that it depends on.</div><div><br></div><div> - David</div><div><br></div></div></div></div><div dir="auto"></div><br><div class="gmail_quote"><div dir="ltr">On Sun, 9 Sep 2018, 05:36 Utkarsh Ayachit, <<a href="mailto:utkarsh.ayachit@kitware.com" target="_blank">utkarsh.ayachit@kitware.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Burlen,<br>
<br>
You're correct an all accounts. That's indeed an issue. I am not sure<br>
what's the best way: should we install the header and export the<br>
libraries, or create a new library/api that dependent projects can<br>
call to init the static Python modules or something even more<br>
creative. If we go the truly modular route, CMakeLoadAllPythonModules<br>
is an anathema. It inits all modules that VTK was built with and not<br>
the only the modules that the app depends on. Ideally, it'd be the<br>
latter. Not sure how we could do that. Ben/David, any ideas?<br>
<br>
Utkarsh<br>
On Sat, Sep 8, 2018 at 2:09 PM Burlen Loring <<a href="mailto:burlen.loring@gmail.com" rel="noreferrer" target="_blank">burlen.loring@gmail.com</a>> wrote:<br>
><br>
> Hi Folks,<br>
><br>
> I'm using VTK in an embedded Python interpreter. In my case VTK is an external project dependency, and to configure my library I point to an externally  installed VTK.  Works great when I compile VTK with BUILD_SHARED_LIBS=ON, but with this set OFF I can't "import vtk". Some of the Python modules are not found. Since vtkpython works, I know there is a way. If I understand correctly I need to have the following before I initialize the interpreter.<br>
><br>
> #include "vtkpythonmodules.h"<br>
><br>
> CMakeLoadAllPythonModules();<br>
><br>
> I'm stuck on the CMake code to locate the header and link dependencies. how do I locate the include directory of  vtkpythonmodules.h? the file is not installed, which seems to be a problem. Then also how can I access the list of link libraries needed? These seem to be stored in an internal variable, but are they exported to the install?<br>
><br>
> Burlen<br>
> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" rel="noreferrer noreferrer" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Search the list archives at: <a href="http://markmail.org/search/?q=vtk-developers" rel="noreferrer noreferrer" target="_blank">http://markmail.org/search/?q=vtk-developers</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="https://public.kitware.com/mailman/listinfo/vtk-developers" rel="noreferrer noreferrer" target="_blank">https://public.kitware.com/mailman/listinfo/vtk-developers</a><br>
><br>
</blockquote></div>