diff --git a/CMakeLists.txt b/CMakeLists.txt
index bbc4afa87f501ee7a127906bef0322028ff9b12f..1ecec3be53c2750b037c1939a00104a08283de49 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,6 +20,11 @@ pkg_check_modules(SOT_CORE REQUIRED sot-core)
 
 include_directories(include)
 
+file(MAKE_DIRECTORY "${LIBRARY_OUTPUT_PATH}/dynamic_graph/ros/ros_export")
+file(MAKE_DIRECTORY "${LIBRARY_OUTPUT_PATH}/dynamic_graph/ros/ros_import")
+file(MAKE_DIRECTORY
+  "${LIBRARY_OUTPUT_PATH}/dynamic_graph/ros/ros_joint_states")
+
 rosbuild_add_library(ros_bridge
   src/converter.hh
   include/dynamic_graph_bridge/ros_init.hh src/ros_init.cpp