Skip to content

Commit

Permalink
Added PCL 1.8 support.
Browse files Browse the repository at this point in the history
  • Loading branch information
Georgi Tinchev committed Sep 8, 2017
1 parent 83f05e6 commit 4af3722
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 13 deletions.
25 changes: 20 additions & 5 deletions src/maps-lcm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,25 @@ add_library(maps-lcm SHARED
ViewClient.cpp
)

find_package(PkgConfig REQUIRED)
pkg_check_modules(PCL_IO pcl_io-1.7)
if(PCL_IO_FOUND)
message("---- PCL IO was found\n")
set(REQ_PKGS pcl_common-1.7 pcl_filters-1.7 pcl_features-1.7 pcl_io-1.7 pcl_surface-1.7)
endif()

pkg_check_modules(PCL_IO_1_8 pcl_io-1.8)
if(PCL_IO_1_8_FOUND)
message("---- PCL IO_1_8 was found\n")
set(REQ_PKGS pcl_common-1.8 pcl_filters-1.8 pcl_features-1.8 pcl_io-1.8 pcl_surface-1.8)
endif()

if(NOT PCL_IO_FOUND AND NOT PCL_IO_1_8_FOUND)
message("---- PCL NOT FOUND. Not building maps_server")
return()
endif()


# make the header public
# install it to include/maps
pods_install_headers(
Expand All @@ -25,11 +44,7 @@ pods_install_libraries(maps-lcm)

set(REQUIRED_PACKAGES
eigen3
pcl_common-1.7
pcl_filters-1.7
pcl_features-1.7
pcl_io-1.7
pcl_surface-1.7
${REQ_PKGS}
octomap
glib-2.0
bot2-frames
Expand Down
26 changes: 21 additions & 5 deletions src/maps/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,29 @@ pods_install_headers(
# make the library public
pods_install_libraries(maps)

find_package(PkgConfig REQUIRED)
pkg_check_modules(PCL_IO pcl_io-1.7)
if(PCL_IO_FOUND)
message("---- PCL IO was found\n")
set(REQ_PKGS pcl_common-1.7 pcl_filters-1.7 pcl_features-1.7 pcl_io-1.7 pcl_surface-1.7)
endif()

pkg_check_modules(PCL_IO_1_8 pcl_io-1.8)
if(PCL_IO_1_8_FOUND)
message("---- PCL IO_1_8 was found\n")
set(REQ_PKGS pcl_common-1.8 pcl_filters-1.8 pcl_features-1.8 pcl_io-1.8 pcl_surface-1.8)
endif()

if(NOT PCL_IO_FOUND AND NOT PCL_IO_1_8_FOUND)
message("---- PCL NOT FOUND. Not building maps_server")
return()
endif()



set(REQUIRED_PACKAGES
eigen3
pcl_common-1.7
pcl_filters-1.7
pcl_features-1.7
pcl_io-1.7
pcl_surface-1.7
${REQ_PKGS}
octomap
glib-2.0
zlib
Expand Down
22 changes: 19 additions & 3 deletions src/plane-seg/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,29 @@
add_definitions(-std=c++1y -Wall)
set(MODULE_NAME plane-seg)

find_package(PkgConfig REQUIRED)
pkg_check_modules(PCL_IO pcl_io-1.7)
if(PCL_IO_FOUND)
message("---- PCL IO was found\n")
set(REQ_PKGS pcl_io-1.7 pcl_surface-1.7 pcl_segmentation-1.7)
endif()

pkg_check_modules(PCL_IO_1_8 pcl_io-1.8)
if(PCL_IO_1_8_FOUND)
message("---- PCL IO_1_8 was found\n")
set(REQ_PKGS pcl_io-1.8 pcl_surface-1.8 pcl_segmentation-1.8)
endif()

if(NOT PCL_IO_FOUND AND NOT PCL_IO_1_8_FOUND)
message("---- PCL NOT FOUND. Not building maps_server")
return()
endif()

# create library
set(LIB_NAME ${MODULE_NAME})
set(REQUIRED_PACKAGES
eigen3
pcl_io-1.7
pcl_surface-1.7
pcl_segmentation-1.7
${REQ_PKGS}
)
add_library(${LIB_NAME} SHARED
PlaneFitter.cpp
Expand Down

0 comments on commit 4af3722

Please sign in to comment.