Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions type_description_interfaces_static/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
cmake_minimum_required(VERSION 3.5)

project(type_description_interfaces_static)

# 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(rosidl_runtime_c REQUIRED)
find_package(rosidl_runtime_cpp REQUIRED)

file(GLOB sources "src/*.c")

add_library(${PROJECT_NAME} ${sources})
target_include_directories(${PROJECT_NAME} PUBLIC
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>"
"$<INSTALL_INTERFACE:include/${PROJECT_NAME}>"
)
target_link_libraries(${PROJECT_NAME} PUBLIC
rosidl_runtime_c::rosidl_runtime_c
rosidl_runtime_cpp::rosidl_runtime_cpp
)

install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}-export
ARCHIVE DESTINATION lib
LIBRARY DESTINATION lib
RUNTIME DESTINATION bin
)

install(DIRECTORY include/
DESTINATION include/${PROJECT_NAME}
)

ament_export_targets(${PROJECT_NAME}-export HAS_LIBRARY_TARGET)
ament_export_dependencies(
ament_cmake_ros
rosidl_runtime_c
rosidl_runtime_cpp
)

ament_package()
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
// generated from rosidl_generator_cpp/resource/idl__builder.hpp.em
// with input from type_description_interfaces:msg/Field.idl
// generated code does not contain a copyright notice

#ifndef TYPE_DESCRIPTION_INTERFACES__MSG__DETAIL__FIELD__BUILDER_HPP_
#define TYPE_DESCRIPTION_INTERFACES__MSG__DETAIL__FIELD__BUILDER_HPP_

#include <algorithm>
#include <utility>

#include "type_description_interfaces/msg/detail/field__struct.hpp"
#include "rosidl_runtime_cpp/message_initialization.hpp"


namespace type_description_interfaces
{

namespace msg
{

namespace builder
{

class Init_Field_default_value
{
public:
explicit Init_Field_default_value(::type_description_interfaces::msg::Field & msg)
: msg_(msg)
{}
::type_description_interfaces::msg::Field default_value(::type_description_interfaces::msg::Field::_default_value_type arg)
{
msg_.default_value = std::move(arg);
return std::move(msg_);
}

private:
::type_description_interfaces::msg::Field msg_;
};

class Init_Field_type
{
public:
explicit Init_Field_type(::type_description_interfaces::msg::Field & msg)
: msg_(msg)
{}
Init_Field_default_value type(::type_description_interfaces::msg::Field::_type_type arg)
{
msg_.type = std::move(arg);
return Init_Field_default_value(msg_);
}

private:
::type_description_interfaces::msg::Field msg_;
};

class Init_Field_name
{
public:
Init_Field_name()
: msg_(::rosidl_runtime_cpp::MessageInitialization::SKIP)
{}
Init_Field_type name(::type_description_interfaces::msg::Field::_name_type arg)
{
msg_.name = std::move(arg);
return Init_Field_type(msg_);
}

private:
::type_description_interfaces::msg::Field msg_;
};

} // namespace builder

} // namespace msg

template<typename MessageType>
auto build();

template<>
inline
auto build<::type_description_interfaces::msg::Field>()
{
return type_description_interfaces::msg::builder::Init_Field_name();
}

} // namespace type_description_interfaces

#endif // TYPE_DESCRIPTION_INTERFACES__MSG__DETAIL__FIELD__BUILDER_HPP_
Loading