CMake: Fix find Matplotlib
This commit is contained in:
@@ -9,7 +9,7 @@
|
||||
# MATPLOTLIB_VERSION_PATCH - the patch version number of matplotlib
|
||||
# MATPLOTLIB_PATH_DIRS - path to the matplotlib include files
|
||||
|
||||
IF(PYTHONINTERP_FOUND)
|
||||
IF(Python3_Interpreter_FOUND)
|
||||
# Try to import matplotlib into Python interpreter. Python
|
||||
# interpreter was found previously as required package, so
|
||||
# don't take care about this.
|
||||
|
||||
@@ -3,10 +3,10 @@ macro(SetupMatplotlib)
|
||||
|
||||
find_package(Matplotlib)
|
||||
if (MATPLOTLIB_FOUND)
|
||||
message(STATUS "-- matplotlib-${MATPLOTLIB_VERSION} has been found.")
|
||||
message(STATUS "Found Matplotlib: ${MATPLOTLIB_PATH_DIRS} (found version \"${MATPLOTLIB_VERSION}\")")
|
||||
else(MATPLOTLIB_FOUND)
|
||||
message("=====================================================\n"
|
||||
"matplotlib not found, Plot module won't be available.\n"
|
||||
"Matplotlib not found, Plot module won't be available.\n"
|
||||
"=====================================================\n")
|
||||
endif(MATPLOTLIB_FOUND)
|
||||
|
||||
|
||||
@@ -138,6 +138,7 @@ macro(SetupPython)
|
||||
set(Python3_VERSION_MAJOR ${PYTHON_VERSION_MAJOR})
|
||||
set(Python3_VERSION_MINOR ${PYTHON_VERSION_MINOR})
|
||||
set(Python3_VERSION_PATCH ${PYTHON_VERSION_PATCH})
|
||||
set(Python3_Interpreter_FOUND ${PYTHONINTERP_FOUND})
|
||||
else()
|
||||
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
|
||||
|
||||
@@ -150,6 +151,7 @@ macro(SetupPython)
|
||||
set(PYTHON_VERSION_MAJOR ${Python3_VERSION_MAJOR})
|
||||
set(PYTHON_VERSION_MINOR ${Python3_VERSION_MINOR})
|
||||
set(PYTHON_VERSION_PATCH ${Python3_VERSION_PATCH})
|
||||
set(PYTHONINTERP_FOUND ${Python3_Interpreter_FOUND})
|
||||
endif()
|
||||
|
||||
# prevent python3 lower than 3.6
|
||||
|
||||
Reference in New Issue
Block a user