Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ubuntu20.04 successfully running #25

Open
StephenYang190 opened this issue Nov 15, 2024 · 0 comments
Open

Ubuntu20.04 successfully running #25

StephenYang190 opened this issue Nov 15, 2024 · 0 comments

Comments

@StephenYang190
Copy link

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant