diff --git a/tools/rosbag_storage/CMakeLists.txt b/tools/rosbag_storage/CMakeLists.txt index 75da667da0..ad2769817b 100644 --- a/tools/rosbag_storage/CMakeLists.txt +++ b/tools/rosbag_storage/CMakeLists.txt @@ -12,6 +12,7 @@ find_package(Boost REQUIRED COMPONENTS date_time filesystem program_options rege find_package(BZip2 REQUIRED) catkin_package( + CFG_EXTRAS rosbag_storage-extras.cmake INCLUDE_DIRS include LIBRARIES rosbag_storage CATKIN_DEPENDS pluginlib roslz4 diff --git a/tools/rosbag_storage/cmake/rosbag_storage-extras.cmake b/tools/rosbag_storage/cmake/rosbag_storage-extras.cmake new file mode 100644 index 0000000000..f3d4df2025 --- /dev/null +++ b/tools/rosbag_storage/cmake/rosbag_storage-extras.cmake @@ -0,0 +1,10 @@ +# PR https://github.com/ros/ros_comm/pull/1206 added support for encryption +# and decryption of rosbags by utilizing libgpgme-dev. On armhf, libgpgme-dev +# is compiled with -D_FILE_OFF_BITS=64, which means that all downstream +# consumers of it must also be compiled with that +# (https://www.gnupg.org/documentation/manuals/gpgme/Largefile-Support-_0028LFS_0029.html +# has some more information). Add that flag to the CMAKE_CXX_FLAGS for all +# architectures where the size of the pointer is less than 8 bytes. +if(CMAKE_SIZEOF_VOID_P LESS 8) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -D_FILE_OFFSET_BITS=64") +endif()