Skip to content

Commit

Permalink
Link to sdformat10 cmake target (#314)
Browse files Browse the repository at this point in the history
This is better than the SDFormat_LIBRARIES variable.

Signed-off-by: Steve Peters <scpeters@openrobotics.org>
  • Loading branch information
scpeters authored Dec 10, 2021
1 parent fa93f17 commit 09924c3
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -57,6 +57,7 @@ ign_find_package(EIGEN3 REQUIRED)
# Find SDFormat for the SDF features
ign_find_package(sdformat10
REQUIRED_BY sdf dartsim tpe bullet)
set(SDFORMAT_VER ${sdformat10_VERSION_MAJOR})

#--------------------------------------
# Find dartsim for the dartsim plugin wrapper
2 changes: 1 addition & 1 deletion sdf/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -2,7 +2,7 @@
ign_add_component(sdf INTERFACE
GET_TARGET_NAME sdf)

target_link_libraries(${sdf} INTERFACE ${SDFormat_LIBRARIES})
target_link_libraries(${sdf} INTERFACE sdformat${SDFORMAT_VER}::sdformat${SDFORMAT_VER})

install(
DIRECTORY include/

0 comments on commit 09924c3

Please sign in to comment.