Code Review
/
apps
/
agl-service-can-low-level.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge pull request #157 from ivankravets/patch-1
[apps/agl-service-can-low-level.git]
/
extra
/
FindNanopb.cmake
diff --git
a/extra/FindNanopb.cmake
b/extra/FindNanopb.cmake
index
513182d
..
e65706a
100644
(file)
--- a/
extra/FindNanopb.cmake
+++ b/
extra/FindNanopb.cmake
@@
-244,17
+244,16
@@
find_file(NANOPB_GENERATOR_EXECUTABLE
)
mark_as_advanced(NANOPB_GENERATOR_EXECUTABLE)
)
mark_as_advanced(NANOPB_GENERATOR_EXECUTABLE)
-# If python3 has already been found, save it and look for python2.
7
-if(${PYTHON_VERSION_MAJOR} EQUAL 3)
+# If python3 has already been found, save it and look for python2.
6
+if(${PYTHON_VERSION_MAJOR}
AND ${PYTHON_VERSION_MAJOR}
EQUAL 3)
set(PYTHON3_EXECUTABLE ${PYTHON_EXECUTABLE})
set(PYTHON_EXECUTABLE PYTHON_EXECUTABLE-NOTFOUND)
set(PYTHON3_EXECUTABLE ${PYTHON_EXECUTABLE})
set(PYTHON_EXECUTABLE PYTHON_EXECUTABLE-NOTFOUND)
-endif()
-
-find_package(PythonInterp 2.7 REQUIRED)
-set(PYTHON2_EXECUTABLE ${PYTHON_EXECUTABLE})
-
-if(${PYTHON_VERSION_MAJOR} EQUAL 3)
+ find_package(PythonInterp 2.6 REQUIRED)
+ set(PYTHON2_EXECUTABLE ${PYTHON_EXECUTABLE})
set(PYTHON_EXECUTABLE ${PYTHON3_EXECUTABLE})
set(PYTHON_EXECUTABLE ${PYTHON3_EXECUTABLE})
+else()
+ find_package(PythonInterp 2.6 REQUIRED)
+ set(PYTHON2_EXECUTABLE ${PYTHON_EXECUTABLE})
endif()
include(FindPackageHandleStandardArgs)
endif()
include(FindPackageHandleStandardArgs)