Skip to content
Draft
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
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ set_default_build_type(Release)
# zenohcxx without dependencies
add_library(zenohcxx INTERFACE)
target_include_directories(zenohcxx INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include")
target_compile_features(zenohcxx INTERFACE cxx_std_17)

if(ZENOHCXX_ZENOHPICO)
if(NOT TARGET zenohpico::lib) # Only find if target is not already available
Expand All @@ -49,6 +50,7 @@ if(ZENOHCXX_ZENOHPICO)
add_library(zenohcxx_zenohpico INTERFACE)
target_compile_definitions(zenohcxx_zenohpico INTERFACE ZENOHCXX_ZENOHPICO)
target_include_directories(zenohcxx_zenohpico INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include")
target_compile_features(zenohcxx_zenohpico INTERFACE cxx_std_17)
add_dependencies(zenohcxx_zenohpico zenohpico::lib)
target_link_libraries(zenohcxx_zenohpico INTERFACE zenohpico::lib)
add_library(zenohcxx::zenohpico ALIAS zenohcxx_zenohpico)
Expand All @@ -66,6 +68,7 @@ if(ZENOHCXX_ZENOHC)
add_library(zenohcxx_zenohc INTERFACE)
target_compile_definitions(zenohcxx_zenohc INTERFACE ZENOHCXX_ZENOHC)
target_include_directories(zenohcxx_zenohc INTERFACE "${CMAKE_CURRENT_SOURCE_DIR}/include")
target_compile_features(zenohcxx_zenohc INTERFACE cxx_std_17)
add_dependencies(zenohcxx_zenohc zenohc::lib)
target_link_libraries(zenohcxx_zenohc INTERFACE zenohc::lib)
add_library(zenohcxx::zenohc ALIAS zenohcxx_zenohc)
Expand Down
3 changes: 3 additions & 0 deletions install/PackageConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ endif()
if(NOT TARGET zenohcxx)
add_library(zenohcxx INTERFACE IMPORTED)
target_include_directories(zenohcxx INTERFACE "${_IMPORT_PREFIX}/@CMAKE_INSTALL_INCLUDEDIR@")
target_compile_features(zenohcxx INTERFACE cxx_std_17)
endif()

# zenohcxx for zenohpico
Expand All @@ -34,6 +35,7 @@ if(TARGET zenohpico::lib AND NOT TARGET zenohcxx_zenohpico)
add_library(zenohcxx_zenohpico INTERFACE IMPORTED)
target_compile_definitions(zenohcxx_zenohpico INTERFACE ZENOHCXX_ZENOHPICO)
target_include_directories(zenohcxx_zenohpico INTERFACE "${_IMPORT_PREFIX}/@CMAKE_INSTALL_INCLUDEDIR@")
target_compile_features(zenohcxx_zenohpico INTERFACE cxx_std_17)
add_dependencies(zenohcxx_zenohpico zenohpico::lib)
target_link_libraries(zenohcxx_zenohpico INTERFACE zenohpico::lib)
add_library(zenohcxx::zenohpico ALIAS zenohcxx_zenohpico)
Expand All @@ -45,6 +47,7 @@ if(TARGET zenohc::lib AND NOT TARGET zenohcxx_zenohc)
add_library(zenohcxx_zenohc INTERFACE IMPORTED)
target_compile_definitions(zenohcxx_zenohc INTERFACE ZENOHCXX_ZENOHC)
target_include_directories(zenohcxx_zenohc INTERFACE "${_IMPORT_PREFIX}/@CMAKE_INSTALL_INCLUDEDIR@")
target_compile_features(zenohcxx_zenohc INTERFACE cxx_std_17)
add_dependencies(zenohcxx_zenohc zenohc::lib)
target_link_libraries(zenohcxx_zenohc INTERFACE zenohc::lib)
add_library(zenohcxx::zenohc ALIAS zenohcxx_zenohc)
Expand Down
Loading