Skip to content

Commit

Permalink
Fix calling find_package(zenohc) twice in CMake (#850)
Browse files Browse the repository at this point in the history
  • Loading branch information
traversaro authored Dec 9, 2024
1 parent 04d279a commit ac41bfe
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions install/PackageConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,11 @@ if(NOT TARGET __zenohc_static)
)
endif()

if(@BUILD_SHARED_LIBS@)
add_library(zenohc::lib ALIAS __zenohc_shared)
else()
add_library(zenohc::lib ALIAS __zenohc_static)
if(NOT TARGET zenohc::lib)
if(@BUILD_SHARED_LIBS@)
add_library(zenohc::lib ALIAS __zenohc_shared)
else()
add_library(zenohc::lib ALIAS __zenohc_static)
endif()
endif()

0 comments on commit ac41bfe

Please sign in to comment.