diff --git a/include/hpp/bezier-com-traj/CMakeLists.txt b/include/hpp/bezier-com-traj/CMakeLists.txt
index 9628ae94fbf1759a786dbdce0d4b08dda9435dfc..9c480336f4c3d2346a9be9d31a8b5f6e861cca7f 100644
--- a/include/hpp/bezier-com-traj/CMakeLists.txt
+++ b/include/hpp/bezier-com-traj/CMakeLists.txt
@@ -8,21 +8,13 @@ SET(${PROJECT_NAME}_HEADERS
   solve_end_effector.hh
   common_solve_methods.hh
   common_solve_methods.inl
-  cost/costfunction_definition.hh
-  waypoints/waypoints_definition.hh
-  waypoints/waypoints_c0_dc0_c1.hh
-  waypoints/waypoints_c0_dc0_dc1.hh
-  waypoints/waypoints_c0_dc0_dc1_c1.hh
-  waypoints/waypoints_c0_dc0_ddc0_c1.hh
-  waypoints/waypoints_c0_dc0_ddc0_dc1_c1.hh
-  waypoints/waypoints_c0_dc0_ddc0_ddc1_dc1_c1.hh
-  include/solver/solver-abstract.hpp
-  include/solver/eiquadprog-fast.hpp
+  )
 
+INSTALL(FILES
+  ${${PROJECT_NAME}_HEADERS}
+  DESTINATION include/${CUSTOM_HEADER_DIR}
   )
 
-IF(USE_GLPK)
-  SET(${PROJECT_NAME}_HEADERS ${${PROJECT_NAME}_HEADERS}
-    include/solver/glpk-wrapper.hpp
-    )
-ENDIF(USE_GLPK)
+ADD_SUBDIRECTORY(cost)
+ADD_SUBDIRECTORY(waypoints)
+ADD_SUBDIRECTORY(solver)
diff --git a/include/hpp/bezier-com-traj/cost/CMakeLists.txt b/include/hpp/bezier-com-traj/cost/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..46a90d5717e249f3b662d70fc0700d943ddd88ea
--- /dev/null
+++ b/include/hpp/bezier-com-traj/cost/CMakeLists.txt
@@ -0,0 +1,8 @@
+SET(${PROJECT_NAME}_COST_HEADERS
+  costfunction_definition.hh
+  )
+
+INSTALL(FILES
+  ${${PROJECT_NAME}_COST_HEADERS}
+  DESTINATION include/${CUSTOM_HEADER_DIR}/cost
+  )
diff --git a/include/hpp/bezier-com-traj/solver/CMakeLists.txt b/include/hpp/bezier-com-traj/solver/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..c65945565a717e60c1e9e849c4dfa03ada7179ad
--- /dev/null
+++ b/include/hpp/bezier-com-traj/solver/CMakeLists.txt
@@ -0,0 +1,15 @@
+SET(${PROJECT_NAME}_SOLVER_HEADERS
+  solver-abstract.hpp
+  eiquadprog-fast.hpp
+  )
+
+IF(USE_GLPK)
+  SET(${PROJECT_NAME}_SOLVER_HEADERS ${${PROJECT_NAME}_SOLVER_HEADERS}
+    glpk-wrapper.hpp
+    )
+ENDIF(USE_GLPK)
+
+INSTALL(FILES
+  ${${PROJECT_NAME}_SOLVER_HEADERS}
+  DESTINATION include/${CUSTOM_HEADER_DIR}/solver
+  )
diff --git a/include/hpp/bezier-com-traj/waypoints/CMakeLists.txt b/include/hpp/bezier-com-traj/waypoints/CMakeLists.txt
new file mode 100644
index 0000000000000000000000000000000000000000..58d7a2adaaa97f09985d1300b29c988e9d9840e6
--- /dev/null
+++ b/include/hpp/bezier-com-traj/waypoints/CMakeLists.txt
@@ -0,0 +1,14 @@
+SET(${PROJECT_NAME}_WAYPOINTS_HEADERS
+  waypoints_definition.hh
+  waypoints_c0_dc0_c1.hh
+  waypoints_c0_dc0_dc1.hh
+  waypoints_c0_dc0_dc1_c1.hh
+  waypoints_c0_dc0_ddc0_c1.hh
+  waypoints_c0_dc0_ddc0_dc1_c1.hh
+  waypoints_c0_dc0_ddc0_ddc1_dc1_c1.hh
+  )
+
+INSTALL(FILES
+  ${${PROJECT_NAME}_WAYPOINTS_HEADERS}
+  DESTINATION include/${CUSTOM_HEADER_DIR}/waypoints
+  )