[vtk-developers] Missing Includes with new module system
Bill Lorensen
bill.lorensen at gmail.com
Thu Jan 10 19:12:26 EST 2019
Is there a VTK cmake variable that lists all components in a particular build?
On Thu, Jan 10, 2019 at 4:10 PM Bill Lorensen <bill.lorensen at gmail.com> wrote:
>
> I have over 1000 C++ examples. The cmakelists.txt file on the web page
> for each example is generated from a template file. So I can fix it
> for all web but it is ugly...
>
> Here is the working, general cmakelists.txt file:
> cmake_minimum_required(VERSION 3.8)
>
> PROJECT(ReadOBJ)
> Find_package(VTK CONFIG)
> if (VTK_VERSION VERSION_LESS "8.90")
> # old system
> Find_package(VTK REQUIRED)
> include(${VTK_USE_FILE})
> # modules are linked via `vtkCommonCore`
> # VTK_DEFINITIONS has autoinit information
> else ()
> # modules are linked via `VTK::CommonCore`
> # vtk_module_autoinit is needed
> Find_package(VTK COMPONENTS
> ChartsCore
> CommonColor
> CommonComputationalGeometry
> CommonSystem
> FiltersExtraction
> FiltersFlowPaths
> FiltersGeneric
> FiltersGeometry
> FiltersHybrid
> FiltersModeling
> # FiltersParallelStatistics # Optional
> FiltersPoints
> FiltersProgrammable
> FiltersTexture
> FiltersVerdict
> GeovisCore
> IOExodus
> IOExport
> # IOFFMPEG # Optional
> IOImport
> IOInfovis
> # IOMySQL # Optional
> IOPLY
> IOParallel
> IOParallelXML
> ImagingColor
> ImagingFourier
> ImagingHybrid
> ImagingMath
> ImagingMorphological
> ImagingSources
> ImagingStatistics
> ImagingStencil
> # InfovisBoostGraphAlgorithms # Optional
> InfovisLayout
> InteractionImage
> RenderingAnnotation
> RenderingContextOpenGL2
> RenderingImage
> RenderingLOD
> RenderingLabel
> RenderingOpenGL2
> RenderingVolumeOpenGL2
> TestingGenericBridge
> TestingRendering
> ViewsContext2D
> ViewsInfovis
> )
> endif ()
> add_executable(ReadOBJ MACOSX_BUNDLE ReadOBJ.cxx )
> target_link_libraries(ReadOBJ ${VTK_LIBRARIES})
>
> On Thu, Jan 10, 2019 at 4:06 PM Bill Lorensen <bill.lorensen at gmail.com> wrote:
> >
> > I'm not specifying any components. If add the required components it works.
> > Before, I did not have to specify components... This is troublesome.
> >
> > Bill
> >
> > On Thu, Jan 10, 2019 at 3:27 PM Bill Lorensen <bill.lorensen at gmail.com> wrote:
> > >
> > > VTK_LIBRARIES is empty.
> > >
> > >
> > >
> > > On Jan 10, 2019 3:07 PM, "Ben Boeckel" <ben.boeckel at kitware.com> wrote:
> > >
> > > On Thu, Jan 10, 2019 at 14:08:28 -0800, Bill Lorensen wrote:
> > > > I have a simple program that fails to find the vtk include files:
> > > > Here is the CMakeLists.txt fiile:
> > > > cmake_minimum_required(VERSION 3.8)
> > > >
> > > > PROJECT(ReadOBJ)
> > > > Find_package(VTK)
> > > > if (VTK_VERSION VERSION_LESS "8.90")
> > > > # old system
> > > > include(${VTK_USE_FILE})
> > > > # modules are linked via `vtkCommonCore`
> > > > # VTK_DEFINITIONS has autoinit information
> > > > else ()
> > > > # modules are linked via `VTK::CommonCore`
> > > > # vtk_module_autoinit is needed
> > > > endif ()
> > > >
> > > > add_executable(ReadOBJ MACOSX_BUNDLE ReadOBJ.cxx )
> > > > target_link_libraries(ReadOBJ ${VTK_LIBRARIES})
> > >
> > > Hmm. What is `VTK_LIBRARIES` set to?
> > >
> > >
> > > --Ben
> > >
> > >
> >
> >
> > --
> > Unpaid intern in BillsParadise at noware dot com
>
>
>
> --
> Unpaid intern in BillsParadise at noware dot com
--
Unpaid intern in BillsParadise at noware dot com
More information about the vtk-developers
mailing list