Skip to content

Commit

Permalink
Support compilation with static libraries (gazebosim#808)
Browse files Browse the repository at this point in the history
Restore functionality of gazebosim#394. Submitted a fix upstream
in gazebosim/gz-cmake#203.

Signed-off-by: Steve Peters <[email protected]>
  • Loading branch information
scpeters committed Dec 29, 2021
1 parent 09c06ea commit 72c4853
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ target_link_libraries(${PROJECT_LIBRARY_TARGET_NAME}
TINYXML2::TINYXML2
using_parser_urdf)

if (NOT BUILD_SHARED_LIBS)
target_compile_definitions(${PROJECT_LIBRARY_TARGET_NAME} PUBLIC IGNITION_SDFORMAT_STATIC_DEFINE)
endif()

if (WIN32)
target_compile_definitions(${PROJECT_LIBRARY_TARGET_NAME} PRIVATE URDFDOM_STATIC)
endif()
Expand Down

0 comments on commit 72c4853

Please sign in to comment.