-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Fix the tutorial qt_visualizer compilation issue: qt4 -> qt5. #2051
Merged
SergioRAgostinho
merged 6 commits into
PointCloudLibrary:master
from
frozar:pcl_qt5_compilation
Nov 8, 2017
Merged
Changes from 4 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
bb0eb9d
[TUTO] Fix the tutorial qt_visualizer compilation issue: qt4 -> qt5.
frozar 56b6306
[TUTO] Fix the tutorial qt_colorize_cloud compilation issue: qt4 -> qt5.
6ee355b
[TUTO] WIP: Cmake
db630a6
[TUTO] Coding style in CMake files.
ad0e25a
[CMAKE] Remove the 'link_directories' instruction.
6cb6424
[TUTO] Remove the need to be in a directory '../build' to build the Q…
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
44 changes: 24 additions & 20 deletions
44
doc/tutorials/content/sources/qt_colorize_cloud/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,32 @@ | ||
cmake_minimum_required (VERSION 2.6 FATAL_ERROR) | ||
cmake_minimum_required(VERSION 2.8.11) | ||
|
||
project (pcl-colorize_cloud) | ||
find_package (Qt4 REQUIRED) | ||
find_package (VTK REQUIRED) | ||
find_package (PCL 1.7.1 REQUIRED) | ||
project(pcl_colorize_cloud) | ||
|
||
include_directories (${PCL_INCLUDE_DIRS}) | ||
link_directories (${PCL_LIBRARY_DIRS}) | ||
add_definitions (${PCL_DEFINITIONS}) | ||
# init_qt: Let's do the CMake job for us | ||
set(CMAKE_AUTOMOC ON) # For meta object compiler | ||
set(CMAKE_AUTORCC ON) # Resource files | ||
set(CMAKE_AUTOUIC ON) # UI files | ||
|
||
set (project_SOURCES main.cpp pclviewer.cpp) | ||
set (project_HEADERS pclviewer.h) | ||
set (project_FORMS pclviewer.ui) | ||
set (VTK_LIBRARIES vtkRendering vtkGraphics vtkHybrid QVTK) | ||
# Find includes in corresponding build directories | ||
set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
|
||
QT4_WRAP_CPP (project_HEADERS_MOC ${project_HEADERS}) | ||
QT4_WRAP_UI (project_FORMS_HEADERS ${project_FORMS}) | ||
# Find the QtWidgets library | ||
find_package(Qt5 REQUIRED Widgets) | ||
|
||
INCLUDE (${QT_USE_FILE}) | ||
ADD_DEFINITIONS (${QT_DEFINITIONS}) | ||
find_package(VTK REQUIRED) | ||
find_package(PCL 1.7.1 REQUIRED) | ||
|
||
ADD_EXECUTABLE (colorize_cloud ${project_SOURCES} | ||
${project_FORMS_HEADERS} | ||
${project_HEADERS_MOC}) | ||
# Fix a compilation bug under ubuntu 16.04 (Xenial) | ||
list(REMOVE_ITEM PCL_LIBRARIES "vtkproj4") | ||
|
||
TARGET_LINK_LIBRARIES (colorize_cloud ${QT_LIBRARIES} ${PCL_LIBRARIES} ${VTK_LIBRARIES}) | ||
include_directories(${PCL_INCLUDE_DIRS}) | ||
link_directories(${PCL_LIBRARY_DIRS}) | ||
add_definitions(${PCL_DEFINITIONS}) | ||
|
||
set(project_SOURCES main.cpp pclviewer.cpp) | ||
|
||
add_executable(${PROJECT_NAME} ${project_SOURCES}) | ||
|
||
target_link_libraries(${PROJECT_NAME} ${PCL_LIBRARIES}) | ||
|
||
qt5_use_modules(${PROJECT_NAME} Widgets) |
44 changes: 24 additions & 20 deletions
44
doc/tutorials/content/sources/qt_visualizer/CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,32 @@ | ||
cmake_minimum_required (VERSION 2.6 FATAL_ERROR) | ||
cmake_minimum_required(VERSION 2.8.11) | ||
|
||
project (pcl-visualizer) | ||
find_package (Qt4 REQUIRED) | ||
find_package (VTK REQUIRED) | ||
find_package (PCL 1.7.1 REQUIRED) | ||
project(pcl_visualizer) | ||
|
||
include_directories (${PCL_INCLUDE_DIRS}) | ||
link_directories (${PCL_LIBRARY_DIRS}) | ||
add_definitions (${PCL_DEFINITIONS}) | ||
# init_qt: Let's do the CMake job for us | ||
set(CMAKE_AUTOMOC ON) # For meta object compiler | ||
set(CMAKE_AUTORCC ON) # Resource files | ||
set(CMAKE_AUTOUIC ON) # UI files | ||
|
||
set (project_SOURCES main.cpp pclviewer.cpp) | ||
set (project_HEADERS pclviewer.h) | ||
set (project_FORMS pclviewer.ui) | ||
set (VTK_LIBRARIES vtkRendering vtkGraphics vtkHybrid QVTK) | ||
# Find includes in corresponding build directories | ||
set(CMAKE_INCLUDE_CURRENT_DIR ON) | ||
|
||
QT4_WRAP_CPP (project_HEADERS_MOC ${project_HEADERS}) | ||
QT4_WRAP_UI (project_FORMS_HEADERS ${project_FORMS}) | ||
# Find the QtWidgets library | ||
find_package(Qt5 REQUIRED Widgets) | ||
|
||
INCLUDE (${QT_USE_FILE}) | ||
ADD_DEFINITIONS (${QT_DEFINITIONS}) | ||
find_package(VTK REQUIRED) | ||
find_package(PCL 1.7.1 REQUIRED) | ||
|
||
ADD_EXECUTABLE (pcl_visualizer ${project_SOURCES} | ||
${project_FORMS_HEADERS} | ||
${project_HEADERS_MOC}) | ||
# Fix a compilation bug under ubuntu 16.04 (Xenial) | ||
list(REMOVE_ITEM PCL_LIBRARIES "vtkproj4") | ||
|
||
TARGET_LINK_LIBRARIES (pcl_visualizer ${QT_LIBRARIES} ${PCL_LIBRARIES} ${VTK_LIBRARIES}) | ||
include_directories(${PCL_INCLUDE_DIRS}) | ||
link_directories(${PCL_LIBRARY_DIRS}) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm not sure this is necessary There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The same. |
||
add_definitions(${PCL_DEFINITIONS}) | ||
|
||
set(project_SOURCES main.cpp pclviewer.cpp) | ||
|
||
add_executable(${PROJECT_NAME} ${project_SOURCES}) | ||
|
||
target_link_libraries(${PROJECT_NAME} ${PCL_LIBRARIES}) | ||
|
||
qt5_use_modules(${PROJECT_NAME} Widgets) |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be required.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Effectively, the
link_directories
instruction is not required.