Use target_compile_definitions instead of add_definitions for version

Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
This commit is contained in:
Christophe Bedard 2020-03-03 14:32:20 -08:00
parent b88c023ffe
commit 6af3433573

View file

@ -134,4 +134,4 @@ endif()
ament_package() ament_package()
add_definitions("-D${PROJECT_NAME}_VERSION=\"${${PROJECT_NAME}_VERSION}\"") target_compile_definitions(${PROJECT_NAME} PRIVATE ${PROJECT_NAME}_VERSION="${${PROJECT_NAME}_VERSION}")