-
Notifications
You must be signed in to change notification settings - Fork 22
Internal
hojonathanho edited this page Sep 13, 2012
·
1 revision
If you want to add a new component--let's call it Tracking
for the purposes of this section--that uses the core libraries (simulation, robots, etc), then follow these steps:
-
In
$BULLETSIM_SOURCE_DIR/CMakeLists.txt
, go to the section markedBuild Options
, and add an option for the Tracking component.option(BUILD_TRACKING "Build tracking code" on)
-
Append a conditional to the end of
$BULLETSIM_SOURCE_DIR/src/CMakeLists.txt
if (BUILD_TRACKING) add_subdirectory(tracking) endif (BUILD_TRACKING)
-
Create the directory
$BULLETSIM_SOURCE_DIR/src/tracking
. Your code will go here. -
You also need a
$BULLETSIM_SOURCE_DIR/src/tracking/CMakeLists.txt
to specify how your code will be built. Here is a rough template:include_directories( ${BULLETSIM_SOURCE_DIR}/src # this lets you include simulation headers # any other include directories ) # Your code's targets go here. For example: add_library(tracking algorithm_common.cpp config_tracking.cpp .....) target_link_libraries(tracking simulation clouds robots) add_executable(.....)