Skip to content

Commit 4a7bf3f

Browse files
authored
Merge pull request #590 from cchampet/fix_cmakeBuildWithoutPythonNorSWIG
CMake: fix some errors if some dependencies are not found
2 parents 72b002d + 1f03b33 commit 4a7bf3f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

applications/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ add_subdirectory(sam)
55
add_subdirectory(script)
66

77
# Edit python scripts if the host is built with python3
8-
if(${TUTTLE_PYTHON_VERSION} VERSION_GREATER "3")
8+
if(${TUTTLE_PYTHON_VERSION} and ${TUTTLE_PYTHON_VERSION} VERSION_GREATER "3")
99
set(BASH_PYTHON2 "#!/usr/bin/env python")
1010
set(BASH_PYTHON3 "#!/usr/bin/env python3")
1111

applications/sam/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
## sam
2+
find_package(SWIG)
3+
if(NOT SWIG_FOUND)
4+
return()
5+
endif()
26

37
set(TUTTLE_INSTALL_SAM_PYTHON "bin/python/sam")
48

0 commit comments

Comments
 (0)