diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 346660d24d35f8a144df50c3571cb9be5be90721..62f2571656697ed9c0facd6abb20c9bf358a51c0 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -58,8 +58,7 @@ FOREACH(lib ${libs})
   INSTALL(TARGETS ${lib} DESTINATION lib/plugin)
   # build python submodule
   STRING(REPLACE - _ PYTHON_LIBRARY_NAME ${lib})
-  ADD_DEPENDENCIES(${lib} MKDIR_${PYTHON_LIBRARY_NAME})
-  FILE(MAKE_DIRECTORY dynamic_graph/sot/dynamics/${PYTHON_LIBRARY_NAME})
+
   DYNAMIC_GRAPH_PYTHON_MODULE("sot/dynamics/${PYTHON_LIBRARY_NAME}"
     ${lib}
     sot-dynamics-${PYTHON_LIBRARY_NAME}-wrap