Skip to content

Commit

Permalink
Drop support of Qt4 (PointCloudLibrary#2618), because support of Qt4 …
Browse files Browse the repository at this point in the history
…ended end of 2015
  • Loading branch information
Heiko Thiel committed Dec 15, 2018
1 parent 26504dd commit 9751ce9
Show file tree
Hide file tree
Showing 12 changed files with 72 additions and 184 deletions.
12 changes: 1 addition & 11 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -359,17 +359,7 @@ endif()

option(WITH_QT "Build QT Front-End" TRUE)
if(WITH_QT)
set(PCL_QT_VERSION 5 CACHE STRING "Which QT version to use")
if("${PCL_QT_VERSION}" STREQUAL "4")
find_package(Qt4)
if(QT4_FOUND)
include("${QT_USE_FILE}")
endif()
elseif("${PCL_QT_VERSION}" STREQUAL "5")
include(cmake/pcl_find_qt5.cmake)
else()
message(SEND_ERROR "PCL_QT_VERSION must be 4 or 5")
endif()
find_package(Qt5 COMPONENTS OpenGL Widgets QUIET)
endif()

# Find VTK
Expand Down
34 changes: 17 additions & 17 deletions apps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -75,18 +75,18 @@ if(build)
PCL_ADD_EXECUTABLE(pcl_stereo_ground_segmentation "${SUBSYS_NAME}" src/stereo_ground_segmentation.cpp)
target_link_libraries(pcl_stereo_ground_segmentation pcl_common pcl_io pcl_filters pcl_visualization pcl_segmentation pcl_features pcl_stereo)

if(QT4_FOUND AND VTK_USE_QVTK)
if(QT5_FOUND AND VTK_USE_QVTK)

# Manual registration demo
QT4_WRAP_UI(manual_registration_ui src/manual_registration/manual_registration.ui)
QT4_WRAP_CPP(manual_registration_moc include/pcl/apps/manual_registration.h OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
QT5_WRAP_UI(manual_registration_ui src/manual_registration/manual_registration.ui)
QT5_WRAP_CPP(manual_registration_moc include/pcl/apps/manual_registration.h OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
PCL_ADD_EXECUTABLE_OPT_BUNDLE(pcl_manual_registration "${SUBSYS_NAME}" ${manual_registration_ui} ${manual_registration_moc} src/manual_registration/manual_registration.cpp)
target_link_libraries(pcl_manual_registration pcl_common pcl_io pcl_visualization pcl_segmentation pcl_features pcl_surface ${QVTK_LIBRARY} ${QT_LIBRARIES})
target_link_libraries(pcl_manual_registration pcl_common pcl_io pcl_visualization pcl_segmentation pcl_features pcl_surface ${QVTK_LIBRARY} Qt5::Widgets)

QT4_WRAP_UI(pcd_video_player_ui src/pcd_video_player/pcd_video_player.ui)
QT4_WRAP_CPP(pcd_video_player_moc include/pcl/apps/pcd_video_player.h OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
QT5_WRAP_UI(pcd_video_player_ui src/pcd_video_player/pcd_video_player.ui)
QT5_WRAP_CPP(pcd_video_player_moc include/pcl/apps/pcd_video_player.h OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
PCL_ADD_EXECUTABLE_OPT_BUNDLE(pcl_pcd_video_player "${SUBSYS_NAME}" ${pcd_video_player_ui} ${pcd_video_player_moc} src/pcd_video_player/pcd_video_player.cpp)
target_link_libraries(pcl_pcd_video_player pcl_common pcl_io pcl_visualization pcl_segmentation pcl_features pcl_surface ${QVTK_LIBRARY} ${QT_LIBRARIES})
target_link_libraries(pcl_pcd_video_player pcl_common pcl_io pcl_visualization pcl_segmentation pcl_features pcl_surface ${QVTK_LIBRARY} Qt5::Widgets)

endif()

Expand Down Expand Up @@ -149,24 +149,24 @@ if(build)
PCL_ADD_EXECUTABLE_OPT_BUNDLE(pcl_openni_face_detector "${SUBSYS_NAME}" src/face_detection//openni_face_detection.cpp src/face_detection//openni_frame_source.cpp)
target_link_libraries(pcl_openni_face_detector pcl_features pcl_recognition pcl_common pcl_io pcl_filters pcl_visualization pcl_segmentation pcl_sample_consensus pcl_surface pcl_keypoints pcl_ml pcl_search pcl_kdtree ${VTK_LIBRARIES})

if(QT4_FOUND AND VTK_USE_QVTK)
if(QT5_FOUND AND VTK_USE_QVTK)
# OpenNI Passthrough application demo
QT4_WRAP_UI(openni_passthrough_ui src/openni_passthrough.ui)
QT4_WRAP_CPP(openni_passthrough_moc include/pcl/apps/openni_passthrough.h OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
QT5_WRAP_UI(openni_passthrough_ui src/openni_passthrough.ui)
QT5_WRAP_CPP(openni_passthrough_moc include/pcl/apps/openni_passthrough.h OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
PCL_ADD_EXECUTABLE(pcl_openni_passthrough "${SUBSYS_NAME}" ${openni_passthrough_ui} ${openni_passthrough_moc} src/openni_passthrough.cpp)
target_link_libraries(pcl_openni_passthrough pcl_common pcl_io pcl_filters pcl_visualization ${QVTK_LIBRARY} ${QT_LIBRARIES})
target_link_libraries(pcl_openni_passthrough pcl_common pcl_io pcl_filters pcl_visualization ${QVTK_LIBRARY} Qt5::Widgets)

# OpenNI Organized Connected Component application demo
QT4_WRAP_UI(organized_segmentation_demo_ui src/organized_segmentation_demo.ui)
QT4_WRAP_CPP(organized_segmentation_demo_moc include/pcl/apps/organized_segmentation_demo.h OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
QT5_WRAP_UI(organized_segmentation_demo_ui src/organized_segmentation_demo.ui)
QT5_WRAP_CPP(organized_segmentation_demo_moc include/pcl/apps/organized_segmentation_demo.h OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
PCL_ADD_EXECUTABLE_OPT_BUNDLE(pcl_organized_segmentation_demo "${SUBSYS_NAME}" ${organized_segmentation_demo_ui} ${organized_segmentation_demo_moc} src/organized_segmentation_demo.cpp)
target_link_libraries(pcl_organized_segmentation_demo pcl_common pcl_io pcl_visualization pcl_segmentation pcl_features pcl_surface ${QVTK_LIBRARY} ${QT_LIBRARIES})
target_link_libraries(pcl_organized_segmentation_demo pcl_common pcl_io pcl_visualization pcl_segmentation pcl_features pcl_surface ${QVTK_LIBRARY} Qt5::Widgets)

# Database processing (integration) demo
# QT4_WRAP_UI(db_proc_ui src/db_proc/db_proc.ui)
# QT4_WRAP_CPP(db_proc_moc include/pcl/apps/db_proc.h OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
# QT5_WRAP_UI(db_proc_ui src/db_proc/db_proc.ui)
# QT5_WRAP_CPP(db_proc_moc include/pcl/apps/db_proc.h OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
# PCL_ADD_EXECUTABLE_OPT_BUNDLE(pcl_db_proc "${SUBSYS_NAME}" ${db_proc_ui} ${db_proc_moc} src/db_proc/db_proc.cpp)
# target_link_libraries(pcl_db_proc pcl_common pcl_io pcl_visualization pcl_segmentation pcl_features pcl_surface ${QVTK_LIBRARY} ${QT_LIBRARIES})
# target_link_libraries(pcl_db_proc pcl_common pcl_io pcl_visualization pcl_segmentation pcl_features pcl_surface ${QVTK_LIBRARY} Qt5::Widgets)

endif()

Expand Down
18 changes: 9 additions & 9 deletions apps/cloud_composer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ else()
include("${VTK_USE_FILE}")
endif()

# QT4 Found?
if(NOT QT4_FOUND)
# QT5 Found?
if(NOT QT5_FOUND)
set(DEFAULT AUTO_OFF)
set(REASON "Qt4 was not found.")
set(REASON "Qt5 was not found.")
elseif(NOT ${DEFAULT} STREQUAL "AUTO_OFF")
set(DEFAULT TRUE)
set(REASON)
Expand Down Expand Up @@ -87,9 +87,9 @@ if(build)
# Build pcl_cc_tool_interface as static library, to fix issue mentioned in #2708
set(PCL_LIB_TYPE_ORIGIN ${PCL_LIB_TYPE})
set(PCL_LIB_TYPE STATIC)
QT4_WRAP_CPP(INTERFACE_HEADERS_MOC ${INTERFACE_HEADERS} OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
QT5_WRAP_CPP(INTERFACE_HEADERS_MOC ${INTERFACE_HEADERS} OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
PCL_ADD_LIBRARY(pcl_cc_tool_interface "${SUBSUBSYS_NAME}" ${INTERFACE_HEADERS} ${INTERFACE_SOURCES} ${INTERFACE_HEADERS_MOC})
target_link_libraries(pcl_cc_tool_interface pcl_common pcl_filters pcl_search pcl_visualization ${VTK_LIBRARIES} ${QT_LIBRARIES})
target_link_libraries(pcl_cc_tool_interface pcl_common pcl_filters pcl_search pcl_visualization ${VTK_LIBRARIES} Qt5::Widgets)
set(PCL_LIB_TYPE ${PCL_LIB_TYPE_ORIGIN})

if(APPLE)
Expand Down Expand Up @@ -139,13 +139,13 @@ if(build)
set(uis src/cloud_composer_main_window.ui)
set(resources resources/resources.qrc)

QT4_WRAP_UI(cloud_composer_ui ${uis})
QT4_WRAP_CPP(cloud_composer_moc ${incs} OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
QT4_ADD_RESOURCES(resource_srcs ${resources})
QT5_WRAP_UI(cloud_composer_ui ${uis})
QT5_WRAP_CPP(cloud_composer_moc ${incs} OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
QT5_ADD_RESOURCES(resource_srcs ${resources})

set(EXE_NAME "pcl_${SUBSUBSYS_NAME}")
PCL_ADD_EXECUTABLE("${EXE_NAME}" "${SUBSUBSYS_NAME}" ${cloud_composer_ui} ${cloud_composer_moc} ${srcs} ${resource_srcs} ${impl_incs})
target_link_libraries("${EXE_NAME}" pcl_cc_tool_interface pcl_common pcl_io pcl_visualization pcl_filters ${QVTK_LIBRARY} ${QT_LIBRARIES})
target_link_libraries("${EXE_NAME}" pcl_cc_tool_interface pcl_common pcl_io pcl_visualization pcl_filters ${QVTK_LIBRARY} Qt5::Widgets)

# Install include files
PCL_ADD_INCLUDES("${SUBSUBSYS_NAME}" "${SUBSUBSYS_NAME}" ${incs} ${item_incs} ${selector_incs})
Expand Down
4 changes: 2 additions & 2 deletions apps/cloud_composer/ComposerTool.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ function(define_composer_tool TOOL_NAME TOOL_SOURCES TOOL_HEADERS DEPS)
project(pcl_cc_tool_${TOOL_NAME})

#message("Making plugin " pcl_cc_tool_${TOOL_NAME})
QT4_WRAP_CPP(TOOL_HEADERS_MOC ${TOOL_HEADERS} OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
QT5_WRAP_CPP(TOOL_HEADERS_MOC ${TOOL_HEADERS} OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
set(TOOL_TARGET pcl_cc_tool_${TOOL_NAME})
# message("Files:" ${TOOL_SOURCES} ${TOOL_HEADERS_MOC})
PCL_ADD_LIBRARY(${TOOL_TARGET} ${SUBSYS_NAME} ${TOOL_SOURCES} ${TOOL_HEADERS} ${TOOL_HEADERS_MOC})
Expand All @@ -19,7 +19,7 @@ function(define_composer_tool TOOL_NAME TOOL_SOURCES TOOL_HEADERS DEPS)
add_definitions(-DQT_NO_DEBUG)
add_definitions(-DQT_SHARED)

target_link_libraries(${TOOL_TARGET} pcl_cc_tool_interface pcl_common pcl_io ${DEPS} ${QT_LIBRARIES})
target_link_libraries(${TOOL_TARGET} pcl_cc_tool_interface pcl_common pcl_io ${DEPS} Qt5::Widgets)

if(APPLE)
set_target_properties(${TOOL_TARGET} PROPERTIES LINK_FLAGS "-undefined dynamic_lookup")
Expand Down
41 changes: 17 additions & 24 deletions apps/in_hand_scanner/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ set(SUBSUBSYS_DEPS common features io kdtree apps)
set(SUBSUBSYS_LIBS pcl_common pcl_features pcl_io pcl_kdtree)

################################################################################
# Qt
if(NOT QT4_FOUND)
# QT5 Found?
if(NOT QT5_FOUND)
set(DEFAULT AUTO_OFF)
set(REASON "Qt4 is required for the in_hand_scanner app!")
else()
set(DEFAULT TRUE)
set(REASON)
set(REASON "Qt5 was not found.")
elseif(NOT ${DEFAULT} STREQUAL "AUTO_OFF")
set(DEFAULT TRUE)
set(REASON)
endif()

# OpenGL
Expand All @@ -37,7 +37,7 @@ if(${DEFAULT} STREQUAL "TRUE")
endif()

pcl_subsubsys_option(build "${SUBSYS_NAME}" "${SUBSUBSYS_NAME}" "${SUBSYS_DESC}" ${DEFAULT} "${REASON}")
pcl_subsubsys_depend(build "${SUBSYS_NAME}" "${SUBSUBSYS_NAME}" DEPS ${SUBSYS_DEPS} EXT_DEPS Qt4 OpenGL OpenGL_GLU openni)
pcl_subsubsys_depend(build "${SUBSYS_NAME}" "${SUBSUBSYS_NAME}" DEPS ${SUBSYS_DEPS} EXT_DEPS Qt5 OpenGL OpenGL_GLU openni)

pcl_add_doc("${SUBSUBSYS_NAME}")

Expand Down Expand Up @@ -99,22 +99,15 @@ set(OI_SRCS
################################################################################

if(build)
qt5_wrap_cpp(MOC_IN_HAND_SCANNER_SRC "${MOC_IN_HAND_SCANNER_INC}")
qt5_wrap_cpp(MOC_OPENGL_VIEWER_SRC "${MOC_OPENGL_VIEWER_INC}" OPTIONS -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
qt5_wrap_cpp(MOC_OFFLINE_INTEGRATION_SRC "${MOC_OFFLINE_INTEGRATION_INC}" OPTIONS -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)

qt5_wrap_cpp(MOC_MAIN_WINDOW_SRC "${MOC_MAIN_WINDOW_INC}")
qt5_wrap_cpp(MOC_HELP_WINDOW_SRC "${MOC_HELP_WINDOW_INC}")
qt5_wrap_ui(UI_MAIN_WINDOW_INC "${UI_MAIN_WINDOW}")
qt5_wrap_ui(UI_HELP_WINDOW_INC "${UI_HELP_WINDOW}")

# Qt
# http://qtnode.net/wiki/Qt4_with_cmake
# http://qt-project.org/quarterly/view/using_cmake_to_build_qt_projects
set(QT_USE_QTOPENGL TRUE)
include("${QT_USE_FILE}")
qt4_wrap_cpp(MOC_IN_HAND_SCANNER_SRC "${MOC_IN_HAND_SCANNER_INC}")
qt4_wrap_cpp(MOC_OPENGL_VIEWER_SRC "${MOC_OPENGL_VIEWER_INC}" OPTIONS -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)
qt4_wrap_cpp(MOC_OFFLINE_INTEGRATION_SRC "${MOC_OFFLINE_INTEGRATION_INC}" OPTIONS -DBOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION)

qt4_wrap_cpp(MOC_MAIN_WINDOW_SRC "${MOC_MAIN_WINDOW_INC}")
qt4_wrap_cpp(MOC_HELP_WINDOW_SRC "${MOC_HELP_WINDOW_INC}")
qt4_wrap_ui(UI_MAIN_WINDOW_INC "${UI_MAIN_WINDOW}")
qt4_wrap_ui(UI_HELP_WINDOW_INC "${UI_HELP_WINDOW}")

list(APPEND ADDITIONAL_LIBS ${QT_LIBRARIES})
include_directories("${CMAKE_CURRENT_BINARY_DIR}" "${CMAKE_CURRENT_SOURCE_DIR}/include")

# In-hand scanner
Expand All @@ -123,7 +116,7 @@ if(build)

set(EXE_NAME "pcl_${SUBSUBSYS_NAME}")
pcl_add_executable_opt_bundle("${EXE_NAME}" "${SUBSUBSYS_NAME}" ${SRCS} ${INCS} ${IMPL_INCS})
target_link_libraries("${EXE_NAME}" ${SUBSUBSYS_LIBS} ${OPENGL_LIBRARIES} ${QT_LIBRARIES})
target_link_libraries("${EXE_NAME}" ${SUBSUBSYS_LIBS} ${OPENGL_LIBRARIES} Qt5::Widgets)

pcl_add_includes("${SUBSUBSYS_NAME}" "${SUBSUBSYS_NAME}" ${INCS})
pcl_add_includes("${SUBSUBSYS_NAME}" "${SUBSUBSYS_NAME}/impl" ${IMPL_INCS})
Expand All @@ -135,7 +128,7 @@ if(build)
list(APPEND OI_SRCS "${MOC_OPENGL_VIEWER_SRC}" "${MOC_OFFLINE_INTEGRATION_SRC}")

pcl_add_executable_opt_bundle(pcl_offline_integration "${SUBSUBSYS_NAME}" ${OI_SRCS} ${OI_INCS})
target_link_libraries(pcl_offline_integration ${SUBSUBSYS_LIBS} ${OPENGL_LIBRARIES} ${QT_LIBRARIES})
target_link_libraries(pcl_offline_integration ${SUBSUBSYS_LIBS} ${OPENGL_LIBRARIES} Qt5::Widgets)

# Add to the compound apps target
list(APPEND PCL_APPS_ALL_TARGETS ${PCL_IN_HAND_SCANNER_ALL_TARGETS})
Expand Down
14 changes: 7 additions & 7 deletions apps/modeler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@ else()
include("${VTK_USE_FILE}")
endif()

# QT4 Found?
if(NOT QT4_FOUND)
# QT5 Found?
if(NOT QT5_FOUND)
set(DEFAULT AUTO_OFF)
set(REASON "Qt4 was not found.")
set(REASON "Qt5 was not found.")
elseif(NOT ${DEFAULT} STREQUAL "AUTO_OFF")
set(DEFAULT TRUE)
set(REASON)
Expand Down Expand Up @@ -112,9 +112,9 @@ if(build)
"include/pcl/${SUBSYS_NAME}/${SUBSUBSYS_NAME}/impl/scene_tree.hpp")

# Qt stuff
QT4_WRAP_UI(ui_srcs ${uis})
QT4_WRAP_CPP(moc_srcs ${moc_incs} OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
QT4_ADD_RESOURCES(resource_srcs ${resources})
QT5_WRAP_UI(ui_srcs ${uis})
QT5_WRAP_CPP(moc_srcs ${moc_incs} OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
QT5_ADD_RESOURCES(resource_srcs ${resources})

# Organize files
SOURCE_GROUP("Resources" FILES ${uis} ${resources} ${EXE_ICON})
Expand All @@ -124,7 +124,7 @@ if(build)
# Generate executable
set(EXE_NAME "pcl_${SUBSUBSYS_NAME}")
PCL_ADD_EXECUTABLE("${EXE_NAME}" "${SUBSUBSYS_NAME}" ${ui_srcs} ${moc_srcs} ${resource_srcs} ${srcs} ${incs} ${impl_incs})
target_link_libraries("${EXE_NAME}" pcl_common pcl_io pcl_kdtree pcl_filters pcl_visualization pcl_segmentation pcl_surface pcl_features pcl_sample_consensus pcl_search ${QVTK_LIBRARY} ${QT_LIBRARIES})
target_link_libraries("${EXE_NAME}" pcl_common pcl_io pcl_kdtree pcl_filters pcl_visualization pcl_segmentation pcl_surface pcl_features pcl_sample_consensus pcl_search ${QVTK_LIBRARY} Qt5::Widgets)

# Put the ui in the windows project file
if("${CMAKE_BUILD_TOOL}" MATCHES "msdev")
Expand Down
14 changes: 7 additions & 7 deletions apps/optronic_viewer/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ elseif(NOT VTK_USE_QVTK)
set(REASON "VTK was not built with Qt support.")
endif()

# Find QT
if(NOT QT_USE_FILE)
# QT5 Found?
if(NOT QT5_FOUND)
set(DEFAULT AUTO_OFF)
set(REASON "Qt was not found.")
set(REASON "Qt5 was not found.")
elseif(NOT ${DEFAULT} STREQUAL "AUTO_OFF")
set(DEFAULT TRUE)
set(REASON)
Expand Down Expand Up @@ -77,9 +77,9 @@ if(build)
set(impl_incs)

# Qt stuff
# QT4_WRAP_UI(ui_srcs ${uis})
QT4_WRAP_CPP(moc_srcs ${moc_incs} OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
# QT4_ADD_RESOURCES(resource_srcs ${resources})
# QT5_WRAP_UI(ui_srcs ${uis})
QT5_WRAP_CPP(moc_srcs ${moc_incs} OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
# QT5_ADD_RESOURCES(resource_srcs ${resources})

# Organize files
# SOURCE_GROUP("Resources" FILES ${uis} ${resources} ${EXE_ICON})
Expand All @@ -90,7 +90,7 @@ if(build)
set(EXE_NAME "pcl_${SUBSUBSYS_NAME}")
# PCL_ADD_EXECUTABLE("${EXE_NAME}" "${SUBSUBSYS_NAME}" ${ui_srcs} ${moc_srcs} ${resource_srcs} ${srcs} ${incs} ${impl_incs})
PCL_ADD_EXECUTABLE("${EXE_NAME}" "${SUBSUBSYS_NAME}" ${moc_srcs} ${srcs} ${incs} ${impl_incs})
target_link_libraries("${EXE_NAME}" pcl_common pcl_io pcl_kdtree pcl_filters pcl_visualization pcl_segmentation pcl_surface pcl_features pcl_sample_consensus pcl_search QVTK ${QT_LIBRARIES})
target_link_libraries("${EXE_NAME}" pcl_common pcl_io pcl_kdtree pcl_filters pcl_visualization pcl_segmentation pcl_surface pcl_features pcl_sample_consensus pcl_search QVTK Qt5::Widgets)

# Put the ui in the windows project file
if("${CMAKE_BUILD_TOOL}" MATCHES "msdev")
Expand Down
23 changes: 10 additions & 13 deletions apps/point_cloud_editor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,11 @@ set(SRCS src/main.cpp
src/denoiseParameterForm.cpp
)

if(NOT QT4_FOUND)
# QT5 Found?
if(NOT QT5_FOUND)
set(DEFAULT AUTO_OFF)
set(REASON "Qt4 was not found.")
else()
set(REASON "Qt5 was not found.")
elseif(NOT ${DEFAULT} STREQUAL "AUTO_OFF")
set(DEFAULT TRUE)
set(REASON)
endif()
Expand All @@ -84,15 +85,11 @@ PCL_SUBSUBSYS_DEPEND(BUILD "${SUBSYS_NAME}" "${SUBSUBSYS_NAME}" ${SUBSYS_DEPS})
PCL_ADD_DOC(${SUBSUBSYS_NAME})

if(BUILD)
include("${QT_USE_FILE}")
set(QT_USE_QTOPENGL TRUE)
#QT4_WRAP_CPP(MOC_SRCS ${MOC_INCS})
QT4_WRAP_CPP(MOC_SRCS ${MOC_INCS} OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
QT4_ADD_RESOURCES(RESOURCES_SRCS ${RSRC})
QT5_WRAP_CPP(MOC_SRCS ${MOC_INCS} OPTIONS -DBOOST_TT_HAS_OPERATOR_HPP_INCLUDED)
QT5_ADD_RESOURCES(RESOURCES_SRCS ${RSRC})

INCLUDE_DIRECTORIES("${CMAKE_CURRENT_BINARY_DIR}"
include_directories("${CMAKE_CURRENT_BINARY_DIR}"
"${CMAKE_CURRENT_SOURCE_DIR}/include"
"${QT_QTOPENGL_INCLUDE_DIR}"
)

set(EXE_NAME "pcl_${SUBSUBSYS_NAME}")
Expand All @@ -104,9 +101,9 @@ if(BUILD)
${INCS}
)

TARGET_LINK_LIBRARIES("${EXE_NAME}"
${QT_LIBRARIES}
${QT_QTOPENGL_LIBRARY}
target_link_libraries("${EXE_NAME}"
Qt5::Widgets
Qt5::OpenGL
${OPENGL_LIBRARIES}
${BOOST_LIBRARIES}
pcl_common
Expand Down
Loading

0 comments on commit 9751ce9

Please sign in to comment.