parent
535a2d7285
commit
393c48f345
2 changed files with 6 additions and 16 deletions
@ -1,24 +1,9 @@ |
||||
cmake_policy(VERSION 3.7) |
||||
|
||||
if(CMAKE_VERSION VERSION_GREATER_EQUAL 3.12) |
||||
find_package(Python COMPONENTS Interpreter) |
||||
else() |
||||
find_package(PythonInterp) |
||||
endif() |
||||
|
||||
find_package(Python COMPONENTS Interpreter) |
||||
if(Python_FOUND OR PYTHONINTERP_FOUND) |
||||
set(SomethingLikePython_FOUND ON) |
||||
set(SomethingLikePython_EXECUTABLE ${Python_EXECUTABLE}) |
||||
|
||||
if(NOT DEFINED Python_VERSION) |
||||
set(Python_VERSION ${Python_VERSION_STRING}) |
||||
endif() |
||||
if(NOT TARGET Python::Interpreter) |
||||
add_executable(Python::Interpreter IMPORTED) |
||||
set_target_properties(Python::Interpreter PROPERTIES |
||||
IMPORTED_LOCATION ${Python_EXECUTABLE} |
||||
VERSION ${Python_VERSION}) |
||||
endif() |
||||
else() |
||||
set(SomethingLikePython_FOUND OFF) |
||||
endif() |
||||
|
@ -0,0 +1,5 @@ |
||||
{ |
||||
"tools": { |
||||
"cmake": ">=3.12" |
||||
} |
||||
} |
Loading…
Reference in new issue