forked from ruslo/hunter
-
Notifications
You must be signed in to change notification settings - Fork 179
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Reduced required CMake version (#498)
- Loading branch information
Showing
2 changed files
with
21 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,24 @@ | ||
cmake_minimum_required(VERSION 3.12) | ||
cmake_minimum_required(VERSION 3.0) | ||
|
||
if(DEFINED ENV{HUNTER_PYTHON_LOCATION}) | ||
set(Python_ROOT_DIR $ENV{HUNTER_PYTHON_LOCATION}) | ||
set(Python_FIND_STRATEGY LOCATION) | ||
endif() | ||
if(${CMAKE_VERSION} VERSION_LESS "3.12.0") | ||
find_package(PythonInterp 3 QUIET) | ||
if(NOT PYTHONINTERP_FOUND) | ||
message(FATAL_ERROR "Python not found") | ||
endif() | ||
message(${PYTHON_EXECUTABLE}) | ||
else() | ||
cmake_minimum_required(VERSION 3.12) | ||
|
||
find_package(Python COMPONENTS Interpreter QUIET) | ||
if(DEFINED ENV{HUNTER_PYTHON_LOCATION}) | ||
set(Python_ROOT_DIR $ENV{HUNTER_PYTHON_LOCATION}) | ||
set(Python_FIND_STRATEGY LOCATION) | ||
endif() | ||
|
||
if(NOT Python_Interpreter_FOUND) | ||
message(FATAL_ERROR "Python not found") | ||
endif() | ||
find_package(Python COMPONENTS Interpreter QUIET) | ||
|
||
message(${Python_EXECUTABLE}) | ||
if(NOT Python_Interpreter_FOUND) | ||
message(FATAL_ERROR "Python not found") | ||
endif() | ||
|
||
message(${Python_EXECUTABLE}) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters