diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6c54a2175..b9bd18467 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -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()