Skip to content

Ubuntu20.04 successfully running #25

Description

@StephenYang190

Hi everyone, I have successfully running this project on ubuntu 20.04.

It is easy to build and run this project with a little modifies.

In Cmakelist.txt, change the following line:

  1. delete line 25-27:
FIND_PACKAGE(VTK)
INCLUDE(${VTK_USE_FILE}) # include UseVTK.cmake
message(STATUS "VTK_LIBRARIES: ${VTK_LIBRARIES}")
  1. add following code between pcl packet and qt packet:
find_package(PCL REQUIRED COMPONENTS)
include_directories(${PCL_INCLUDE_DIRS})
link_directories(${PCL_LIBRARY_DIRS})
add_definitions(${PCL_DEFINITIONS})
message(STATUS "PCL_LIBRARIES: ${PCL_LIBRARIES}")

FIND_PACKAGE(VTK)
INCLUDE(${VTK_USE_FILE}) # include UseVTK.cmake
message(STATUS "VTK_LIBRARIES: ${VTK_LIBRARIES}")

include_directories(${CMAKE_SOURCE_DIR})
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON) # For meta object compiler
set(CMAKE_AUTORCC ON) # Resource files
#set(CMAKE_AUTOUIC ON) # UI files
find_package(Qt5 COMPONENTS Widgets REQUIRED)
QT5_WRAP_UI(ui_mainwindow.h mainwindow.ui)
  1. add qt gui support in target link:
target_link_libraries(${PROJECT_NAME} ${PCL_LIBRARIES} Qt5::Widgets vtkGUISupportQt)

After all the modifies, you can build and run this project with just :

sudo apt update
sudo apt install libpcl-dev

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions