diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2b6c170c48fcc1a24ba4e4606c5a9232fcf7219d..3501edcc83f052d833465c5f7a53a803d1a0aa84 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -322,6 +322,8 @@ if((PYTHONINTERP_FOUND) AND (${PYTHON_VERSION_MAJOR} EQUAL 3))
   add_definitions("-DPYTHON_VERSION=\"${PYTHON_VERSION_STRING}\"")
 else()
   message (WARNING "Could not find python 3x")
+  add_definitions("-DPYTHON=\"${PYTHON_EXECUTABLE}\"")
+  add_definitions("-DPYTHON_VERSION=\"${PYTHON_VERSION_STRING}\"")
 endif()
 
 # ----------------------------- cTest ------------------------------------------