[vtk-developers] How to determine if a module is available without a cmake error
Bill Lorensen
bill.lorensen at gmail.com
Wed Aug 15 10:31:52 EDT 2012
How to determine ia a module is present in a built VTK without generating a
cmake error?
Find_Package(VTK COMPONENTS vtkXXX) will report a cmake error if vtkXXX is
not present.
I thought I could do this:
Find_Package(VTK QUIET COMPONENTS vtkXXX)
if (NOT VTK_FOUND)
message(STATUS "Warning vtkXXX is required but not available")
endif()
but Find_Package(VTK QUIET COMPONENTS vtkXXX) also reports an error.
CMake Error at CMake/vtkModuleAPI.cmake:90 (message):
Requested modules not available:
vtkXXX
Call Stack (most recent call first):
/Users/lorensen/ProjectsGIT/VTK-build/VTKConfig.cmake:72
(vtk_module_config)
/Applications/CMake
2.8-7.app/Contents/share/cmake-2.8/Modules/FindVTK.cmake:73 (FIND_PACKAGE)
Examples/CMakeLists.txt:10 (FIND_PACKAGE)
I want to disable certain builds if a given component is missing.
Bill
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20120815/f9670f0e/attachment.html>
More information about the vtk-developers
mailing list