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

  Switch to unified view

a/CMakeLists.txt b/CMakeLists.txt
...
...
318
    find_package(PythonInterp REQUIRED)
318
    find_package(PythonInterp REQUIRED)
319
    find_package(PythonLibs ${PYTHON_VERSION_STRING} REQUIRED)
319
    find_package(PythonLibs ${PYTHON_VERSION_STRING} REQUIRED)
320
  endif()
320
  endif()
321
  INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
321
  INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_PATH})
322
  ADD_DEFINITIONS(-DHUGIN_HSI)
322
  ADD_DEFINITIONS(-DHUGIN_HSI)
323
  FIND_FILE(PYTHON_PATCHLEVEL_H patchlevel.h
324
      PATHS ${PYTHON_INCLUDE_DIRS}
325
  )
326
  IF(${PYTHON_PATCHLEVEL_H} MATCHES "-NOTFOUND")
327
      MESSAGE(FATAL_ERROR "Python patchlevel.h not found")
328
  ENDIF()
323
  # get version of Python libs
329
  # get version of Python libs
324
  FILE(STRINGS "${PYTHON_INCLUDE_DIRS}/patchlevel.h"
330
  FILE(STRINGS "${PYTHON_PATCHLEVEL_H}"
325
    PY_DEF_MAJOR
331
      PY_DEF_MAJOR
326
    REGEX "#define[ \t]+PY_MAJOR_VERSION.*$")
332
      REGEX "#define[ \t]+PY_MAJOR_VERSION.*$")
327
  FILE(STRINGS "${PYTHON_INCLUDE_DIRS}/patchlevel.h"
333
  FILE(STRINGS "${PYTHON_PATCHLEVEL_H}"
328
      PY_DEF_MINOR
334
      PY_DEF_MINOR
329
      REGEX "#define[ \t]+PY_MINOR_VERSION.*$")
335
      REGEX "#define[ \t]+PY_MINOR_VERSION.*$")
330
336
331
  FILE(STRINGS "${PYTHON_INCLUDE_DIRS}/patchlevel.h"
337
  FILE(STRINGS "${PYTHON_PATCHLEVEL_H}"
332
      PY_DEF_MICRO
338
      PY_DEF_MICRO
333
      REGEX "#define[ \t]+PY_MICRO_VERSION.*$")
339
      REGEX "#define[ \t]+PY_MICRO_VERSION.*$")
334
  STRING(REGEX
340
  STRING(REGEX
335
        REPLACE "^.*VERSION[ \t]+([0-9]+).*" "\\1"
341
        REPLACE "^.*VERSION[ \t]+([0-9]+).*" "\\1"
336
        PYTHON_VERSION_MAJOR
342
        PYTHON_VERSION_MAJOR