Conan.io recipe for cyclonedds-cxx.
The package is usually consumed using the conan install
command or a conanfile.txt.
-
Add remote to conan's package remotes:
$ conan remote add sintef https://artifactory.smd.sintef.no/artifactory/api/conan/conan-local
-
Using conanfile.txt in your project with cmake
Add a conanfile.txt to your project. This file describes dependencies and your configuration of choice, e.g.:
[requires] cyclonedds-cxx/[>=0.10.2]@sintef/stable [options] None [imports] licenses, * -> ./licenses @ folder=True [generators] cmake_paths cmake_find_package
Insert into your CMakeLists.txt something like the following lines:
cmake_minimum_required(VERSION 3.16) project(TheProject CXX) include(${CMAKE_BINARY_DIR}/conan_paths.cmake) find_package(CycloneDDS-CXX MODULE REQUIRED) #find_package(CycloneDDS-CXX CONFIG REQUIRED) # also available # idlcxx_generate function to create from idl is available add_executable(the_executor code.cpp) target_link_libraries(the_executor CycloneDDS-CXX::ddscxx)
Then, do
$ mkdir build && cd build $ conan install .. -s build_type=<build_type>
where
<build_type>
is e.g.Debug
orRelease
. You can now continue with the usual dance with cmake commands for configuration and compilation. For details on how to use conan, please consult Conan.io docs
Option | Values | Default |
---|---|---|
shared | [True, False] | True |
with_shm | [True, False] | True |
with_ddslib | [True, False] | True (since 0.11.0) |
with_idllib | [True, False] | True (since 0.10.2) |
with_type_discovery | [True, False] | True (since 0.10.2) |
with_topic_discovery | [True, False] | True (since 0.10.2) |
with_doc | [True, False] | False |
with_examples | [True, False] | False |
with_tests | [True, False] | False |
with_analyzer | [True, False, "clang-tidy"] | False |
with_coverage | [True, False] | False |
with_sanitizer | ANY | "" |
with_werror | [True, False] | False |
iceoryx_posh_testing | ANY | "" |
Option with_shm=True
does not work on Windows until it is supported by cyclonedds
.
conan-center's package iceoryx does not provide the target
iceoryx_posh_testing::iceoryx_posh_testing
, so with_tests=True
and with_shm=True
not
work unless the missing packages are found by CMake. One workaround for this is to
provide CMAKE_PREFIX_PATH
using option iceoryx_posh_testing
, i.e. specifying the path
to the library cmake config scripts (or by installing iceoryx on a default search path).