File tree Expand file tree Collapse file tree 2 files changed +21
-11
lines changed Expand file tree Collapse file tree 2 files changed +21
-11
lines changed Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 3.12 )
1+ cmake_minimum_required (VERSION 3.0 )
22
3- if (DEFINED ENV{HUNTER_PYTHON_LOCATION})
4- set (Python_ROOT_DIR $ENV{HUNTER_PYTHON_LOCATION} )
5- set (Python_FIND_STRATEGY LOCATION )
6- endif ()
3+ if (${CMAKE_VERSION} VERSION_LESS "3.12.0" )
4+ find_package (PythonInterp 3 QUIET )
5+ if (NOT PYTHONINTERP_FOUND)
6+ message (FATAL_ERROR "Python not found" )
7+ endif ()
8+ message (${PYTHON_EXECUTABLE} )
9+ else ()
10+ cmake_minimum_required (VERSION 3.12)
711
8- find_package (Python COMPONENTS Interpreter QUIET )
12+ if (DEFINED ENV{HUNTER_PYTHON_LOCATION})
13+ set (Python_ROOT_DIR $ENV{HUNTER_PYTHON_LOCATION} )
14+ set (Python_FIND_STRATEGY LOCATION )
15+ endif ()
916
10- if (NOT Python_Interpreter_FOUND)
11- message (FATAL_ERROR "Python not found" )
12- endif ()
17+ find_package (Python COMPONENTS Interpreter QUIET )
1318
14- message (${Python_EXECUTABLE} )
19+ if (NOT Python_Interpreter_FOUND)
20+ message (FATAL_ERROR "Python not found" )
21+ endif ()
22+
23+ message (${Python_EXECUTABLE} )
24+ endif ()
Original file line number Diff line number Diff line change 1- cmake_minimum_required (VERSION 3.12 )
1+ cmake_minimum_required (VERSION 3.0 )
22
33string (COMPARE EQUAL "${HUNTER_INSTALL_PREFIX} " "" is_empty)
44if (is_empty)
You can’t perform that action at this time.
0 commit comments