+IF (ENABLE_PYTHON3 AND NOT DEFINED PythonLibs_FIND_VERSION)
+ # if we build both for python2 and python3, make this the python2 build.
+ # see comment in the python3 CMakeLists.txt file
+ SET (PythonLibs_FIND_VERSION 2)
+ SET (PythonLibs_FIND_VERSION_MAJOR 2)
+ENDIF (ENABLE_PYTHON3 AND NOT DEFINED PythonLibs_FIND_VERSION)
+
+FIND_PACKAGE (PythonLibs REQUIRED)
+FIND_PACKAGE (PythonInterp ${PYTHONLIBS_VERSION_STRING} REQUIRED)
+