Skip to content

Commit

Permalink
Merge pull request #26 from flaviofontana/add_dynamic_reconfigure
Browse files Browse the repository at this point in the history
added autodetection of dynamic_reconfigure
  • Loading branch information
wjwwood committed Jun 24, 2015
2 parents 3880a54 + 3e89bd7 commit 15bc42d
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cmake/catkin_simple-extras.cmake.em
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,20 @@ macro(catkin_simple)
list(INSERT ${PROJECT_NAME}_CATKIN_BUILD_DEPENDS_EXPORTED_TARGETS 0 ${${PROJECT_NAME}_EXPORTED_TARGETS})
endif()
endif()

# generate dynamic reconfigure files
if(dynamic_reconfigure_FOUND_CATKIN_PROJECT)
set(${PROJECT_NAME}_LOCAL_CFG_DIR ${CMAKE_CURRENT_SOURCE_DIR}/cfg)
if(IS_DIRECTORY ${${PROJECT_NAME}_LOCAL_CFG_DIR})
# create a list containing all the cfg files
file(GLOB ${PROJECT_NAME}_LOCAL_CFG_FILES RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}" "${${PROJECT_NAME}_LOCAL_CFG_DIR}/*.cfg")
if(${PROJECT_NAME}_LOCAL_CFG_FILES)
generate_dynamic_reconfigure_options(${${PROJECT_NAME}_LOCAL_CFG_FILES})
# add build dep on gencfg
list(APPEND ${PROJECT_NAME}_CATKIN_BUILD_DEPENDS_EXPORTED_TARGETS ${PROJECT_NAME}_gencfg)
endif()
endif()
endif()
endmacro()

macro(cs_add_targets_to_package)
Expand Down

0 comments on commit 15bc42d

Please sign in to comment.