diff --git a/python/CMakeLists.txt b/python/CMakeLists.txt
index 8c8c163832aae2736603b6c4d517311ffec7a136..4903df9907dc704c95dd8a4a660456e82eb5a659 100644
--- a/python/CMakeLists.txt
+++ b/python/CMakeLists.txt
@@ -1,5 +1,5 @@
 # Define the wrapper library that wraps our library
-ADD_LIBRARY(${PY_NAME} SHARED centroidal_dynamics_python)
+ADD_LIBRARY(${PY_NAME} SHARED centroidal_dynamics_python.cpp)
 TARGET_LINK_LIBRARIES(${PY_NAME} ${PROJECT_NAME} eigenpy::eigenpy)
 # don't prepend wrapper library name with lib
 SET_TARGET_PROPERTIES(${PY_NAME} PROPERTIES PREFIX "")