<commit_before>cmake_minimum_required(VERSION 3.5)

project(intra_process_demo)

# Default to C++14
if(NOT CMAKE_CXX_STANDARD)
  set(CMAKE_CXX_STANDARD 14)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
  add_compile_options(-Wall -Wextra -Wpedantic)
endif()

find_package(ament_cmake REQUIRED)
find_package(builtin_interfaces REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rmw REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(std_msgs REQUIRED)

find_package(OpenCV REQUIRED COMPONENTS core highgui videoio)

include_directories(include)
# TODO(sloretz) stop exporting old-style CMake variables in the future
ament_export_include_directories("include/${PROJECT_NAME}")

##
## Demos
##

# Simple example of using unique_ptr to minimize copies.
add_executable(two_node_pipeline
  src/two_node_pipeline/two_node_pipeline.cpp)
target_link_libraries(two_node_pipeline
  rclcpp::rclcpp
  ${std_msgs_TARGETS})

  # Simple example of a cyclic pipeline which uses no allocation while iterating.
add_executable(cyclic_pipeline
  src/cyclic_pipeline/cyclic_pipeline.cpp)
target_link_libraries(cyclic_pipeline
  rclcpp::rclcpp
  ${std_msgs_TARGETS})

# A single program with one of each of the image pipeline demo nodes.
add_executable(image_pipeline_all_in_one
  src/image_pipeline/image_pipeline_all_in_one.cpp)
target_link_libraries(image_pipeline_all_in_one
  rclcpp::rclcpp
  ${builtin_interfaces_TARGETS}
  ${sensor_msgs_TARGETS}
  opencv_core
  opencv_highgui)

# A single program with one of each of the image pipeline demo nodes, but two image views.
add_executable(image_pipeline_with_two_image_view
  src/image_pipeline/image_pipeline_with_two_image_view.cpp)
target_link_libraries(image_pipeline_with_two_image_view
  rclcpp::rclcpp
  ${builtin_interfaces_TARGETS}
  ${sensor_msgs_TARGETS}
  opencv_core
  opencv_highgui)

# A stand alone node which produces images from a camera using OpenCV.
add_executable(camera_node
  src/image_pipeline/camera_node.cpp)
target_link_libraries(camera_node
  rclcpp::rclcpp
  ${builtin_interfaces_TARGETS}
  ${sensor_msgs_TARGETS}
  opencv_core
  opencv_highgui)<commit_msg>Add opencv_imgproc dependency for cv::putText (#554)<commit_after>cmake_minimum_required(VERSION 3.5)

project(intra_process_demo)

# Default to C++14
if(NOT CMAKE_CXX_STANDARD)
  set(CMAKE_CXX_STANDARD 14)
endif()

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
  add_compile_options(-Wall -Wextra -Wpedantic)
endif()

find_package(ament_cmake REQUIRED)
find_package(builtin_interfaces REQUIRED)
find_package(rclcpp REQUIRED)
find_package(rmw REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(std_msgs REQUIRED)

find_package(OpenCV REQUIRED COMPONENTS core highgui imgproc videoio)

include_directories(include)
# TODO(sloretz) stop exporting old-style CMake variables in the future
ament_export_include_directories("include/${PROJECT_NAME}")

##
## Demos
##

# Simple example of using unique_ptr to minimize copies.
add_executable(two_node_pipeline
  src/two_node_pipeline/two_node_pipeline.cpp)
target_link_libraries(two_node_pipeline
  rclcpp::rclcpp
  ${std_msgs_TARGETS})

  # Simple example of a cyclic pipeline which uses no allocation while iterating.
add_executable(cyclic_pipeline
  src/cyclic_pipeline/cyclic_pipeline.cpp)
target_link_libraries(cyclic_pipeline
  rclcpp::rclcpp
  ${std_msgs_TARGETS})

# A single program with one of each of the image pipeline demo nodes.
add_executable(image_pipeline_all_in_one
  src/image_pipeline/image_pipeline_all_in_one.cpp)
target_link_libraries(image_pipeline_all_in_one
  rclcpp::rclcpp
  ${builtin_interfaces_TARGETS}
  ${sensor_msgs_TARGETS}
  opencv_core
  opencv_highgui)

# A single program with one of each of the image pipeline demo nodes, but two image views.
add_executable(image_pipeline_with_two_image_view
  src/image_pipeline/image_pipeline_with_two_image_view.cpp)
target_link_libraries(image_pipeline_with_two_image_view
  rclcpp::rclcpp
  ${builtin_interfaces_TARGETS}
  ${sensor_msgs_TARGETS}
  opencv_core
  opencv_highgui)

# A stand alone node which produces images from a camera using OpenCV.
add_executable(camera_node
  src/image_pipeline/camera_node.cpp)
target_link_libraries(camera_node
  rclcpp::rclcpp
  ${builtin_interfaces_TARGETS}
  ${sensor_msgs_TARGETS}
  opencv_core
  opencv_highgui
  opencv_imgproc)
{'fraction_non_alphanumeric': 0.06598173515981735, 'fraction_numerical': 0.003424657534246575, 'mean_word_length': 7.692460317460317, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1344133', 'n_tokens_mistral': 1611, 'n_tokens_neox': 1588, 'n_words': 298}