Skip to content

Commit

Permalink
fix python check when the version number couldn't be found. defaultin…
Browse files Browse the repository at this point in the history
…g to 2.7
  • Loading branch information
opdenkamp committed Apr 6, 2015
1 parent 48eee78 commit 7de715f
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/libcec/cmake/CheckPlatformSupport.cmake
Expand Up @@ -119,7 +119,13 @@ find_package(SWIG)
if (PYTHONLIBS_FOUND AND SWIG_FOUND)
set(CMAKE_SWIG_FLAGS "")
set(HAVE_PYTHON 1)
string(REGEX REPLACE "\\.[0-9]+\\+?$" "" PYTHON_VERSION ${PYTHONLIBS_VERSION_STRING})
if ("${PYTHONLIBS_VERSION_STRING}" STREQUAL "")
message(STATUS "Python version not found, defaulting to 2.7")
set(PYTHONLIBS_VERSION_STRING "2.7.x")
set(PYTHON_VERSION "2.7")
else()
string(REGEX REPLACE "\\.[0-9]+\\+?$" "" PYTHON_VERSION ${PYTHONLIBS_VERSION_STRING})
endif()

include(${SWIG_USE_FILE})
include_directories(${PYTHON_INCLUDE_PATH})
Expand Down

0 comments on commit 7de715f

Please sign in to comment.