diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2021-05-20 00:01:40 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2021-05-20 00:01:40 +0200 |
commit | 766688b5179933bc1772c4572efcd884c4d8159f (patch) | |
tree | 001ab4e46729ee67a92805973148fad867169b03 /debian/uncrustify-trinity/uncrustify-trinity-0.73.0/debian/patches/006_fix_python_detection_on_older_cmake.diff | |
parent | 86176cf37105bf3be3d65377ab7f7b40350a07f1 (diff) | |
download | extra-dependencies-766688b5179933bc1772c4572efcd884c4d8159f.tar.gz extra-dependencies-766688b5179933bc1772c4572efcd884c4d8159f.zip |
DEB uncrustify: Fix Python detection on CMake < 3.12.
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
Diffstat (limited to 'debian/uncrustify-trinity/uncrustify-trinity-0.73.0/debian/patches/006_fix_python_detection_on_older_cmake.diff')
-rw-r--r-- | debian/uncrustify-trinity/uncrustify-trinity-0.73.0/debian/patches/006_fix_python_detection_on_older_cmake.diff | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/debian/patches/006_fix_python_detection_on_older_cmake.diff b/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/debian/patches/006_fix_python_detection_on_older_cmake.diff new file mode 100644 index 00000000..3b11610d --- /dev/null +++ b/debian/uncrustify-trinity/uncrustify-trinity-0.73.0/debian/patches/006_fix_python_detection_on_older_cmake.diff @@ -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 |