[vtkusers] Simple type that pulls in libvtkexpat
Clinton Stimpson
clinton at elemtech.com
Mon Apr 20 12:12:44 EDT 2009
How about something like this:
In the C++ source code:
#include "vtkToolkits.h"
#ifdef VTK_USE_SYSTEM_EXPAT
...
#else
...
#endif
in a cmake file:
find_package(VTK)
include(${VTK_USE_FILE})
...
target_link_libraries(myapp ${VTK_EXPAT_LIBRARIES})
Clint
Andre Majorel wrote:
> Howdy. For configuration purposes, I need to detect whether
> libvtkexpat is there or not (Debian's libvtk5-dev lacks it).
>
> The idea is to compile a program that uses a function normally
> provided by libvtkexpat and link it *without* -lvtkexpat. If it
> links, we're on a libvtkexpat-less platform.
>
> Any suggestions for a suitable bit of C++ code ? Ideally, it would
> have to be,
> - short and simple,
> - compatible with any 5.x release of libvtk,
> - if possible, compatible any 4.x release,
> - likely to work with future versions of libvtk.
>
> Thanks in advance.
>
>
More information about the vtkusers
mailing list