Signed-off-by: Slávek Banko <slavek.banko@axis.cz>pull/4/head
parent
86176cf371
commit
766688b517
@ -0,0 +1,22 @@
|
||||
Fix Python detection on CMake < 3.12.
|
||||
===================================================================
|
||||
--- uncrustify-trinity-0.73.0.orig/CMakeLists.txt
|
||||
+++ uncrustify-trinity-0.73.0/CMakeLists.txt
|
||||
@@ -17,8 +17,15 @@ include(CheckCXXSymbolExists)
|
||||
include(CheckTypeSize)
|
||||
include(CTest)
|
||||
|
||||
-find_package(Python3 REQUIRED)
|
||||
-set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
|
||||
+if( ${CMAKE_VERSION} VERSION_LESS "3.12" )
|
||||
+ find_package( PythonInterp )
|
||||
+ if( NOT PYTHON_EXECUTABLE )
|
||||
+ message( FATAL_ERROR "Python is required, but was not found on your system" )
|
||||
+ endif()
|
||||
+ else( )
|
||||
+ find_package(Python3 REQUIRED)
|
||||
+ set(PYTHON_EXECUTABLE ${Python3_EXECUTABLE})
|
||||
+endif()
|
||||
|
||||
#
|
||||
# Check compiler flags
|
Loading…
Reference in new issue