Diff of /CMakeLists.txt [bcb37e] .. [9928ad] Maximize Restore

  Switch to side-by-side view

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -320,15 +320,21 @@
   endif()
   INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
   ADD_DEFINITIONS(-DHUGIN_HSI)
+  FIND_FILE(PYTHON_PATCHLEVEL_H patchlevel.h
+      PATHS ${PYTHON_INCLUDE_DIRS}
+  )
+  IF(${PYTHON_PATCHLEVEL_H} MATCHES "-NOTFOUND")
+      MESSAGE(FATAL_ERROR "Python patchlevel.h not found")
+  ENDIF()
   # get version of Python libs
-  FILE(STRINGS "${PYTHON_INCLUDE_DIRS}/patchlevel.h"
-	  PY_DEF_MAJOR
-	  REGEX "#define[ \t]+PY_MAJOR_VERSION.*$")
-  FILE(STRINGS "${PYTHON_INCLUDE_DIRS}/patchlevel.h"
+  FILE(STRINGS "${PYTHON_PATCHLEVEL_H}"
+      PY_DEF_MAJOR
+      REGEX "#define[ \t]+PY_MAJOR_VERSION.*$")
+  FILE(STRINGS "${PYTHON_PATCHLEVEL_H}"
       PY_DEF_MINOR
       REGEX "#define[ \t]+PY_MINOR_VERSION.*$")
 
-  FILE(STRINGS "${PYTHON_INCLUDE_DIRS}/patchlevel.h"
+  FILE(STRINGS "${PYTHON_PATCHLEVEL_H}"
       PY_DEF_MICRO
       REGEX "#define[ \t]+PY_MICRO_VERSION.*$")
   STRING(REGEX