diff --git a/rtc/DataLogger/CMakeLists.txt b/rtc/DataLogger/CMakeLists.txt index a19b81210b2..58912c9120e 100644 --- a/rtc/DataLogger/CMakeLists.txt +++ b/rtc/DataLogger/CMakeLists.txt @@ -8,11 +8,14 @@ add_executable(DataLoggerComp DataLoggerComp.cpp ${comp_sources}) target_link_libraries(DataLoggerComp ${libs}) find_package(PCL) -if (PCL_FOUND AND "${PCL_VERSION_MINOR}" GREATER 6) +find_package(VTK) + +if ( PCL_FOUND AND PCL_IO_FOUND AND VTK_FOUND AND "${PCL_VERSION_MINOR}" GREATER 6) + include(${VTK_USE_FILE}) include_directories(${PCL_INCLUDE_DIRS}) link_directories(${PCL_LIBRARY_DIRS}) add_executable(PointCloudLogViewer PointCloudLogViewer) - target_link_libraries(PointCloudLogViewer ${PCL_LIBRARIES}) + target_link_libraries(PointCloudLogViewer ${PCL_LIBRARIES} ${VTK_LIBRARIES}) set(target DataLogger DataLoggerComp PointCloudLogViewer) else() set(target DataLogger DataLoggerComp)