Skip to content

Commit

Permalink
Merge pull request #909 from jspricke/boost_chrono
Browse files Browse the repository at this point in the history
Support Boost 1.46 (needed for Ubuntu precise)
  • Loading branch information
taketwo committed Sep 13, 2014
2 parents b0a0f37 + c7a6176 commit 9f8faa3
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 18 deletions.
8 changes: 6 additions & 2 deletions cmake/pcl_find_boost.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,19 @@ endif(${CMAKE_VERSION} VERSION_LESS 2.8.5)
set(Boost_NO_BOOST_CMAKE ON)

# Optional boost modules
find_package(Boost 1.47.0 QUIET COMPONENTS serialization mpi)
find_package(Boost 1.40.0 QUIET COMPONENTS serialization mpi)
if(Boost_SERIALIZATION_FOUND)
set(BOOST_SERIALIZATION_FOUND TRUE)
endif(Boost_SERIALIZATION_FOUND)

# Required boost modules
if(BUILD_OPENNI2)
set(BOOST_REQUIRED_MODULES system filesystem thread date_time iostreams chrono)

find_package(Boost 1.47.0 REQUIRED COMPONENTS ${BOOST_REQUIRED_MODULES})
else()
set(BOOST_REQUIRED_MODULES system filesystem thread date_time iostreams)
find_package(Boost 1.40.0 REQUIRED COMPONENTS ${BOOST_REQUIRED_MODULES})
endif()

if(Boost_FOUND)
set(BOOST_FOUND TRUE)
Expand Down
32 changes: 16 additions & 16 deletions io/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,6 @@ endif(WIN32)
PCL_ADD_DOC("${SUBSYS_NAME}")

if(build)
set(IMAGE_INCLUDES
include/pcl/io/image_metadata_wrapper.h
include/pcl/io/image.h
include/pcl/io/image_rgb24.h
include/pcl/io/image_yuv422.h
include/pcl/io/image_ir.h
include/pcl/io/image_depth.h
)

set(IMAGE_SOURCES
src/image_rgb24.cpp
src/image_yuv422.cpp
src/image_ir.cpp
src/image_depth.cpp
)

## OpenNI 2.x
OPTION(BUILD_OPENNI2 "Build the OpenNI 2 Grabber." OFF)
MARK_AS_ADVANCED(BUILD_OPENNI2)
Expand All @@ -38,6 +22,22 @@ if(build)
set(OPENNI2_FOUND FALSE)
endif()
if(OPENNI2_FOUND)
set(IMAGE_INCLUDES
include/pcl/io/image_metadata_wrapper.h
include/pcl/io/image.h
include/pcl/io/image_rgb24.h
include/pcl/io/image_yuv422.h
include/pcl/io/image_ir.h
include/pcl/io/image_depth.h
)

set(IMAGE_SOURCES
src/image_rgb24.cpp
src/image_yuv422.cpp
src/image_ir.cpp
src/image_depth.cpp
)

set(OPENNI2_GRABBER_INCLUDES
include/pcl/io/openni2_grabber.h
)
Expand Down
2 changes: 2 additions & 0 deletions io/include/pcl/io/boost.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@
#include <boost/mpl/vector.hpp>
#include <boost/algorithm/string.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#if BOOST_VERSION >= 104700
#include <boost/chrono.hpp>
#endif
#include <boost/tokenizer.hpp>
#include <boost/foreach.hpp>
#include <boost/shared_array.hpp>
Expand Down
2 changes: 2 additions & 0 deletions visualization/src/pcl_visualizer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4480,7 +4480,9 @@ pcl::visualization::PCLVisualizer::getUniqueCameraFile (int argc, char **argv)
boost::filesystem::path path (argv[p_file_indices[i]]);
if (boost::filesystem::exists (path))
{
#if BOOST_VERSION >= 104800
path = boost::filesystem::canonical (path);
#endif
str = path.string ().c_str ();
sha1.process_bytes (str, std::strlen (str));
valid = true;
Expand Down

0 comments on commit 9f8faa3

Please sign in to comment.