fix build with python3 only
This commit is contained in:
@@ -232,8 +232,13 @@ find_python(3.4 "${MIN_VER_PYTHON3}" PYTHON3_LIBRARY PYTHON3_INCLUDE_DIR
|
||||
PYTHON3_INCLUDE_DIR PYTHON3_INCLUDE_DIR2 PYTHON3_PACKAGES_PATH
|
||||
PYTHON3_NUMPY_INCLUDE_DIRS PYTHON3_NUMPY_VERSION)
|
||||
|
||||
# Use Python 2 as default Python interpreter
|
||||
if(PYTHON2INTERP_FOUND)
|
||||
|
||||
if(PYTHON_DEFAULT_EXECUTABLE)
|
||||
set(PYTHON_DEFAULT_AVAILABLE "TRUE")
|
||||
elseif(PYTHON2INTERP_FOUND) # Use Python 2 as default Python interpreter
|
||||
set(PYTHON_DEFAULT_AVAILABLE "TRUE")
|
||||
set(PYTHON_DEFAULT_EXECUTABLE "${PYTHON2_EXECUTABLE}")
|
||||
elseif(PYTHON3INTERP_FOUND) # Use Python 2 as fallback Python interpreter (if there is no Python 2)
|
||||
set(PYTHON_DEFAULT_AVAILABLE "TRUE")
|
||||
set(PYTHON_DEFAULT_EXECUTABLE "${PYTHON3_EXECUTABLE}")
|
||||
endif()
|
||||
|
Reference in New Issue
Block a user