Commit 3672859a authored by Utkarsh Ayachit's avatar Utkarsh Ayachit Committed by Ben Boeckel
Browse files

vtkIOPDAL: update to the new module system

parent 9a966f24
find_package(PDAL CONFIG REQUIRED)
mark_as_advanced(PDAL_INCLUDE_DIR PDAL_LIBRARY)
vtk_module_find_package(PACKAGE PDAL)
set(PDALReader_SRCS vtkPDALReader.cxx)
set(classes
vtkPDALReader)
include_directories(${PDAL_INCLUDE_DIRS})
# PDAL_LIBRARIES don't provide full paths which does not work if PDAL is not
# installed as a system library
foreach(pdal_lib IN LISTS PDAL_LIBRARIES)
if (NOT IS_ABSOLUTE ${pddal_lib})
link_directories("${PDAL_DIR}/../../")
break()
endif()
endforeach()
vtk_module_library(vtkIOPDAL ${PDALReader_SRCS})
vtk_module_link_libraries(vtkIOPDAL LINK_PRIVATE ${PDAL_LIBRARIES})
vtk_module_add_module(VTK::IOPDAL
CLASSES ${classes})
vtk_module_link(VTK::IOPDAL
PRIVATE
pdal_base)
# XXX(pdal): PDAL should add include interfaces to its exported targets. See
# https://github.com/PDAL/PDAL/issues/2262.
vtk_module_include(VTK::IOPDAL
PRIVATE
${PDAL_INCLUDE_DIRS})
# TODO: Simplify this with some argument passing.
set(VTK_PDAL_READER_TESTS)
function(add_vtk_pdal_reader_test test_input elevation)
get_filename_component(VTK_PDAL_READER_POSTFIX ${test_input} NAME_WE)
......
vtk_module(vtkIOPDAL
TEST_DEPENDS
vtkTestingCore
vtkRenderingOpenGL2
vtkTestingRendering
vtkInteractionStyle
EXCLUDE_FROM_ALL
KIT
vtkIO
DEPENDS
vtkCommonCore
vtkFiltersGeneral
vtkCommonExecutionModel
PRIVATE_DEPENDS
vtkCommonDataModel
)
NAME
VTK::IOPDAL
LIBRARY_NAME
vtkIOPDAL
KIT
VTK::IO
DEPENDS
VTK::CommonCore
VTK::CommonExecutionModel
VTK::FiltersGeneral
PRIVATE_DEPENDS
VTK::CommonDataModel
TEST_DEPENDS
VTK::InteractionStyle
VTK::RenderingOpenGL2
VTK::TestingCore
VTK::TestingRendering
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment