Browse Source

Remove crazy from korlib PythonInterp selection

pull/77/head
Adam Johnson 7 years ago
parent
commit
ee822c1fbd
Signed by: Hoikas
GPG Key ID: 0B6515D6FF6F271E
  1. 10
      korlib/CMakeLists.txt

10
korlib/CMakeLists.txt

@ -5,15 +5,7 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
# Stolen shamelessly from PyHSPlasma # Stolen shamelessly from PyHSPlasma
find_package(PythonLibs REQUIRED) find_package(PythonLibs REQUIRED)
# Use only the major.minor version -- no patch, no +, etc find_package(PythonInterp "3.5" REQUIRED)
STRING(REGEX REPLACE "([0-9]\\.[0-9])[0-9.+]*" "\\1" PYTHONLIBS_VERSION_STRING_FILTERED "${PYTHONLIBS_VERSION_STRING}")
find_package(PythonInterp "${PYTHONLIBS_VERSION_STRING_FILTERED}" REQUIRED)
# make sure the versions match
STRING(REGEX REPLACE "([0-9]\\.[0-9])[0-9.+]*" "\\1" PYTHON_VERSION_STRING_FILTERED "${PYTHON_VERSION_STRING}")
if (NOT "${PYTHONLIBS_VERSION_STRING_FILTERED}" STREQUAL "${PYTHON_VERSION_STRING_FILTERED}")
message(FATAL_ERROR "Versions of Python libraries (${PYTHONLIBS_VERSION_STRING_FILTERED}) and Python interpreter (${PYTHON_VERSION_STRING_FILTERED}) do not match. Please configure the paths manually.")
endif()
find_package(HSPlasma REQUIRED) find_package(HSPlasma REQUIRED)
find_package(Ogg REQUIRED) find_package(Ogg REQUIRED)
find_package(OpenGL REQUIRED) find_package(OpenGL REQUIRED)

Loading…
Cancel
Save