Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix build examples using find_package #324

Merged
merged 2 commits into from
Jan 26, 2024
Merged
Changes from 1 commit
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
4 changes: 3 additions & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_CURRENT_SOURCE_DIR})
project(zenohpico_examples LANGUAGES C)
include(../cmake/helpers.cmake)
set_default_build_type(Release)
configure_include_project(ZENOHPICO zenohpico zenohpico ".." zenohc "https://github.com/eclipse-zenoh/zenoh-pico" "")
configure_include_project(ZENOHPICO zenohpico zenohpico::static ".." zenohpico "https://github.com/eclipse-zenoh/zenoh-pico" "")
add_custom_target(examples ALL)
else()
message(STATUS "zenoh-pico examples")
Expand All @@ -19,6 +19,7 @@ function(add_example name)
endfunction()

if(UNIX)
add_definitions(-DZENOH_LINUX)
jean-roland marked this conversation as resolved.
Show resolved Hide resolved
if(CMAKE_C_STANDARD MATCHES "99")
add_example(z_put unix/c99/z_put.c)
add_example(z_pub unix/c99/z_pub.c)
Expand Down Expand Up @@ -49,6 +50,7 @@ if(UNIX)
add_example(z_sub_thr unix/c11/z_sub_thr.c)
endif()
elseif(MSVC)
add_definitions(-DZENOH_WINDOWS)
add_example(z_put windows/z_put.c)
add_example(z_pub windows/z_pub.c)
add_example(z_pub_st windows/z_pub_st.c)
Expand Down
Loading