Skip to content

Commit

Permalink
CMakeLists updates for new future names
Browse files Browse the repository at this point in the history
Signed-off-by: Emerson Knapp <[email protected]>
  • Loading branch information
Emerson Knapp committed Mar 22, 2021
1 parent 7c727ec commit 5717e63
Show file tree
Hide file tree
Showing 17 changed files with 137 additions and 131 deletions.
2 changes: 1 addition & 1 deletion rosbag2/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.5)
project(rosbag2)
project(rosbag2_future)

find_package(ament_cmake REQUIRED)
ament_package()
20 changes: 10 additions & 10 deletions rosbag2_compression/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.5)
project(rosbag2_compression)
project(rosbag2_compression_future)

# Default to C99
if(NOT CMAKE_C_STANDARD)
Expand All @@ -24,8 +24,8 @@ find_package(ament_cmake REQUIRED)
find_package(pluginlib REQUIRED)
find_package(rcpputils REQUIRED)
find_package(rcutils REQUIRED)
find_package(rosbag2_cpp)
find_package(rosbag2_storage REQUIRED)
find_package(rosbag2_cpp_future)
find_package(rosbag2_storage_future REQUIRED)

add_library(${PROJECT_NAME}
SHARED
Expand All @@ -41,8 +41,8 @@ ament_target_dependencies(${PROJECT_NAME}
pluginlib
rcpputils
rcutils
rosbag2_cpp
rosbag2_storage)
rosbag2_cpp_future
rosbag2_storage_future)
target_compile_definitions(${PROJECT_NAME} PRIVATE ROSBAG2_COMPRESSION_BUILDING_DLL)

# prevent pluginlib from using boost
Expand All @@ -62,13 +62,13 @@ install(
ament_export_include_directories(include)
ament_export_libraries(${PROJECT_NAME})
ament_export_targets(export_${PROJECT_NAME})
ament_export_dependencies(pluginlib rcpputils rcutils rosbag2_cpp rosbag2_storage)
ament_export_dependencies(pluginlib rcpputils rcutils rosbag2_cpp_future rosbag2_storage_future)

if(BUILD_TESTING)
find_package(ament_cmake_gmock REQUIRED)
find_package(ament_lint_auto REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rosbag2_test_common REQUIRED)
find_package(rosbag2_test_common_future REQUIRED)
ament_lint_auto_find_test_dependencies()

add_library(fake_plugin SHARED
Expand All @@ -81,7 +81,7 @@ if(BUILD_TESTING)
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin)
pluginlib_export_plugin_description_file(
rosbag2_compression test/rosbag2_compression/fake_plugin.xml)
rosbag2_compression_future test/rosbag2_compression/fake_plugin.xml)

ament_add_gmock(test_compression_factory
test/rosbag2_compression/test_compression_factory.cpp)
Expand All @@ -96,13 +96,13 @@ if(BUILD_TESTING)
test/rosbag2_compression/test_sequential_compression_reader.cpp)
target_include_directories(test_sequential_compression_reader PUBLIC include)
target_link_libraries(test_sequential_compression_reader ${PROJECT_NAME})
ament_target_dependencies(test_sequential_compression_reader rosbag2_cpp rosbag2_storage)
ament_target_dependencies(test_sequential_compression_reader rosbag2_cpp_future rosbag2_storage_future)

ament_add_gmock(test_sequential_compression_writer
test/rosbag2_compression/test_sequential_compression_writer.cpp)
target_include_directories(test_sequential_compression_writer PUBLIC include)
target_link_libraries(test_sequential_compression_writer ${PROJECT_NAME})
ament_target_dependencies(test_sequential_compression_writer rosbag2_cpp rosbag2_storage)
ament_target_dependencies(test_sequential_compression_writer rosbag2_cpp_future rosbag2_storage_future)
endif()

ament_package()
15 changes: 8 additions & 7 deletions rosbag2_compression_zstd/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.5)
project(rosbag2_compression_zstd)
project(rosbag2_compression_zstd_future)

# Default to C99
if(NOT CMAKE_C_STANDARD)
Expand All @@ -23,7 +23,7 @@ endif()
find_package(ament_cmake REQUIRED)
find_package(pluginlib REQUIRED)
find_package(rcpputils REQUIRED)
find_package(rosbag2_compression REQUIRED)
find_package(rosbag2_compression_future REQUIRED)
find_package(zstd_vendor REQUIRED)
find_package(zstd REQUIRED)

Expand All @@ -37,10 +37,11 @@ target_include_directories(${PROJECT_NAME}
$<INSTALL_INTERFACE:include>)
ament_target_dependencies(${PROJECT_NAME}
rcpputils
rosbag2_compression
rosbag2_compression_future
zstd_vendor
zstd)
target_compile_definitions(${PROJECT_NAME} PRIVATE ROSBAG2_COMPRESSION_ZSTD_BUILDING_DLL)
pluginlib_export_plugin_description_file(rosbag2_compression plugin_description.xml)
pluginlib_export_plugin_description_file(rosbag2_compression_future plugin_description.xml)

install(
DIRECTORY include/
Expand All @@ -57,21 +58,21 @@ ament_export_include_directories(include)
ament_export_libraries(${PROJECT_NAME})
ament_export_targets(export_${PROJECT_NAME})
# order matters here, first vendor, then zstd
ament_export_dependencies(rcpputils rosbag2_compression zstd_vendor zstd)
ament_export_dependencies(rcpputils rosbag2_compression_future zstd_vendor zstd)


if(BUILD_TESTING)
find_package(ament_cmake_gmock REQUIRED)
find_package(ament_lint_auto REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rosbag2_test_common REQUIRED)
find_package(rosbag2_test_common_future REQUIRED)
ament_lint_auto_find_test_dependencies()

ament_add_gmock(test_zstd_compressor
test/rosbag2_compression_zstd/test_zstd_compressor.cpp)
target_include_directories(test_zstd_compressor PUBLIC include)
target_link_libraries(test_zstd_compressor ${PROJECT_NAME})
ament_target_dependencies(test_zstd_compressor rclcpp rosbag2_test_common)
ament_target_dependencies(test_zstd_compressor rclcpp rosbag2_test_common_future)
endif()

ament_package()
2 changes: 1 addition & 1 deletion rosbag2_compression_zstd/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<depend>rcpputils</depend>
<depend>rcutils</depend>
<depend>rosbag2_compression_future</depend>
<depend>zstd_vendor_future</depend>
<depend>zstd_vendor</depend>

<test_depend>ament_cmake_gmock</test_depend>
<test_depend>ament_lint_auto</test_depend>
Expand Down
25 changes: 13 additions & 12 deletions rosbag2_cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.5)
project(rosbag2_cpp)
project(rosbag2_cpp_future)

# Default to C99
if(NOT CMAKE_C_STANDARD)
Expand Down Expand Up @@ -40,7 +40,7 @@ find_package(rcpputils REQUIRED)
find_package(rcutils REQUIRED)
find_package(rmw REQUIRED)
find_package(rmw_implementation REQUIRED)
find_package(rosbag2_storage REQUIRED)
find_package(rosbag2_storage_future REQUIRED)
find_package(rosidl_runtime_c REQUIRED)
find_package(rosidl_runtime_cpp REQUIRED)
find_package(rosidl_typesupport_cpp REQUIRED)
Expand Down Expand Up @@ -69,7 +69,7 @@ ament_target_dependencies(${PROJECT_NAME}
rcutils
rmw
rmw_implementation
rosbag2_storage
rosbag2_storage_future
rosidl_runtime_c
rosidl_runtime_cpp
rosidl_typesupport_cpp
Expand Down Expand Up @@ -106,7 +106,7 @@ ament_export_targets(export_${PROJECT_NAME})
ament_export_dependencies(pluginlib
rmw
rmw_implementation
rosbag2_storage
rosbag2_storage_future
rosidl_runtime_c
rosidl_runtime_cpp
rosidl_typesupport_cpp
Expand All @@ -117,21 +117,22 @@ if(BUILD_TESTING)
find_package(ament_cmake_gmock REQUIRED)
find_package(ament_lint_auto REQUIRED)
find_package(test_msgs REQUIRED)
find_package(rosbag2_test_common_future REQUIRED)
ament_lint_auto_find_test_dependencies()

add_library(
converter_test_plugins
SHARED
test/rosbag2_cpp/serializer_test_plugin.cpp
test/rosbag2_cpp/converter_test_plugin.cpp)
ament_target_dependencies(converter_test_plugins rosbag2_storage)
ament_target_dependencies(converter_test_plugins rosbag2_storage_future)
target_link_libraries(converter_test_plugins ${PROJECT_NAME})
install(
TARGETS converter_test_plugins
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin)
pluginlib_export_plugin_description_file(rosbag2_cpp test/rosbag2_cpp/converter_test_plugin.xml)
pluginlib_export_plugin_description_file(rosbag2_cpp_future test/rosbag2_cpp/converter_test_plugin.xml)

ament_add_gmock(test_converter_factory
test/rosbag2_cpp/test_converter_factory.cpp)
Expand All @@ -152,20 +153,20 @@ if(BUILD_TESTING)
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
if(TARGET test_info)
target_link_libraries(test_info ${PROJECT_NAME})
ament_target_dependencies(test_info rosbag2_test_common)
ament_target_dependencies(test_info rosbag2_test_common_future)
endif()

ament_add_gmock(test_sequential_reader
test/rosbag2_cpp/test_sequential_reader.cpp)
if(TARGET test_sequential_reader)
ament_target_dependencies(test_sequential_reader rosbag2_storage)
ament_target_dependencies(test_sequential_reader rosbag2_storage_future)
target_link_libraries(test_sequential_reader ${PROJECT_NAME})
endif()

ament_add_gmock(test_storage_without_metadata_file
test/rosbag2_cpp/test_storage_without_metadata_file.cpp)
if(TARGET test_storage_without_metadata_file)
ament_target_dependencies(test_storage_without_metadata_file rosbag2_storage)
ament_target_dependencies(test_storage_without_metadata_file rosbag2_storage_future)
target_link_libraries(test_storage_without_metadata_file ${PROJECT_NAME})
endif()

Expand Down Expand Up @@ -193,7 +194,7 @@ if(BUILD_TESTING)
ament_target_dependencies(test_ros2_message
ament_index_cpp
rcpputils
rosbag2_storage
rosbag2_storage_future
rosidl_runtime_cpp
rosidl_typesupport_introspection_cpp
rosidl_typesupport_cpp
Expand All @@ -203,14 +204,14 @@ if(BUILD_TESTING)
ament_add_gmock(test_sequential_writer
test/rosbag2_cpp/test_sequential_writer.cpp)
if(TARGET test_sequential_writer)
ament_target_dependencies(test_sequential_writer rosbag2_storage)
ament_target_dependencies(test_sequential_writer rosbag2_storage_future)
target_link_libraries(test_sequential_writer ${PROJECT_NAME})
endif()

ament_add_gmock(test_multifile_reader
test/rosbag2_cpp/test_multifile_reader.cpp)
if(TARGET test_multifile_reader)
ament_target_dependencies(test_multifile_reader rosbag2_storage)
ament_target_dependencies(test_multifile_reader rosbag2_storage_future)
target_link_libraries(test_multifile_reader ${PROJECT_NAME})
endif()
endif()
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.5)
project(rosbag2_performance_benchmarking)
project(rosbag2_performance_benchmarking_future)

# Default to C++14
if(NOT CMAKE_CXX_STANDARD)
Expand All @@ -15,9 +15,9 @@ find_package(ament_cmake REQUIRED)
if(BUILD_ROSBAG2_BENCHMARKS)
find_package(rclcpp REQUIRED)
find_package(rcutils REQUIRED)
find_package(rosbag2_compression REQUIRED)
find_package(rosbag2_cpp REQUIRED)
find_package(rosbag2_storage REQUIRED)
find_package(rosbag2_compression_future REQUIRED)
find_package(rosbag2_cpp_future REQUIRED)
find_package(rosbag2_storage_future REQUIRED)
find_package(rmw REQUIRED)
find_package(std_msgs REQUIRED)
find_package(yaml_cpp_vendor REQUIRED)
Expand All @@ -39,22 +39,22 @@ if(BUILD_ROSBAG2_BENCHMARKS)
ament_target_dependencies(writer_benchmark
rclcpp
std_msgs
rosbag2_compression
rosbag2_cpp
rosbag2_storage
rosbag2_compression_future
rosbag2_cpp_future
rosbag2_storage_future
yaml_cpp_vendor
)

ament_target_dependencies(benchmark_publishers
rclcpp
rosbag2_storage
rosbag2_storage_future
std_msgs
yaml_cpp_vendor
)

ament_target_dependencies(results_writer
rclcpp
rosbag2_storage
rosbag2_storage_future
)

target_include_directories(writer_benchmark
Expand Down
26 changes: 13 additions & 13 deletions rosbag2_py/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ endif()
find_package(ament_cmake REQUIRED)
find_package(ament_cmake_python REQUIRED)
find_package(ament_cmake_ros REQUIRED)
find_package(rosbag2_compression REQUIRED)
find_package(rosbag2_cpp REQUIRED)
find_package(rosbag2_storage REQUIRED)
find_package(rosbag2_compression_future REQUIRED)
find_package(rosbag2_cpp_future REQUIRED)
find_package(rosbag2_storage_future REQUIRED)

# Find python before pybind11
find_package(python_cmake_module REQUIRED)
Expand Down Expand Up @@ -71,9 +71,9 @@ pybind11_add_module(_reader SHARED
src/rosbag2_py/_reader.cpp
)
ament_target_dependencies(_reader PUBLIC
"rosbag2_compression"
"rosbag2_cpp"
"rosbag2_storage"
"rosbag2_compression_future"
"rosbag2_cpp_future"
"rosbag2_storage_future"
)
clean_windows_flags(_reader)

Expand All @@ -82,27 +82,27 @@ pybind11_add_module(_storage SHARED
src/rosbag2_py/format_bag_metadata.cpp
)
ament_target_dependencies(_storage PUBLIC
"rosbag2_cpp"
"rosbag2_storage"
"rosbag2_cpp_future"
"rosbag2_storage_future"
)
clean_windows_flags(_storage)

pybind11_add_module(_writer SHARED
src/rosbag2_py/_writer.cpp
)
ament_target_dependencies(_writer PUBLIC
"rosbag2_compression"
"rosbag2_cpp"
"rosbag2_storage"
"rosbag2_compression_future"
"rosbag2_cpp_future"
"rosbag2_storage_future"
)
clean_windows_flags(_writer)

pybind11_add_module(_info SHARED
src/rosbag2_py/_info.cpp
)
ament_target_dependencies(_info PUBLIC
"rosbag2_cpp"
"rosbag2_storage"
"rosbag2_cpp_future"
"rosbag2_storage_future"
)
clean_windows_flags(_info)

Expand Down
2 changes: 1 addition & 1 deletion rosbag2_py/package.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0"?>
<?xml-model href="http://download.ros.org/schema/package_format3.xsd" schematypens="http://www.w3.org/2001/XMLSchema"?>
<package format="3">
<name>rosbag2_py_future</name>
<name>rosbag2_py</name>
<version>0.6.0</version>
<description>Python API for rosbag2</description>
<maintainer email="[email protected]">Karsten Knese</maintainer>
Expand Down
Loading

0 comments on commit 5717e63

Please sign in to comment.