Skip to content

Commit

Permalink
Merge pull request #1 from DenisBiryukov91/keep_feature_defines_in_cm…
Browse files Browse the repository at this point in the history
…ake_package_config

keep feature defines in PackageConfig.cmake.in
  • Loading branch information
bjsowa authored Sep 2, 2024
2 parents 9a9f05a + 1bba5e6 commit 09fbdfc
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ add_library(${Libname})
function(add_definition value)
add_definitions(-D${value})
target_compile_definitions(${Libname} PUBLIC ${value})
add_library(zenohpico::lib ALIAS ${Libname})
endfunction()

add_definition(ZENOH_C_STANDARD=${CMAKE_C_STANDARD})
Expand Down
11 changes: 11 additions & 0 deletions PackageConfig.cmake.in
Original file line number Diff line number Diff line change
@@ -1,7 +1,18 @@
include(CMakeFindDependencyMacro)

set(ZENOHPICO_FEATURE_UNSTABLE_API @Z_FEATURE_UNSTABLE_API@)
set(ZENOHPICO_FEATURE_MULTI_THREAD @Z_FEATURE_MULTI_THREAD@)
set(ZENOHPICO_FEATURE_PUBLICATION @Z_FEATURE_PUBLICATION@)
set(ZENOHPICO_FEATURE_SUBSCRIPTION @Z_FEATURE_SUBSCRIPTION@)
set(ZENOHPICO_FEATURE_QUERY @Z_FEATURE_QUERY@)
set(ZENOHPICO_FEATURE_QUERYABLE @Z_FEATURE_QUERYABLE@)
set(ZENOHPICO_FEATURE_RAWETH_TRANSPORT @Z_FEATURE_RAWETH_TRANSPORT@)
set(ZENOHPICO_FEATURE_INTEREST @Z_FEATURE_INTEREST@)

if(@CHECK_THREADS@)
find_dependency(Threads REQUIRED)
endif()

include("${CMAKE_CURRENT_LIST_DIR}/zenohpicoTargets.cmake")

add_library(zenohpico::lib ALIAS zenohpico::zenohpico)

0 comments on commit 09fbdfc

Please sign in to comment.