git://developer.intra2net.com
/
libftdi
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
0ce1c56
)
Workaround for cmake bug #0013449
author
xantares
<xantares09@hotmail.com>
Mon, 23 Sep 2013 07:48:49 +0000 (09:48 +0200)
committer
Thomas Jarosch
<thomas.jarosch@intra2net.com>
Thu, 31 Oct 2013 14:36:45 +0000 (15:36 +0100)
python/CMakeLists.txt
patch
|
blob
|
blame
|
history
diff --git
a/python/CMakeLists.txt
b/python/CMakeLists.txt
index
9341054
..
fdba559
100644
(file)
--- a/
python/CMakeLists.txt
+++ b/
python/CMakeLists.txt
@@
-2,7
+2,16
@@
option ( PYTHON_BINDINGS "Build python bindings via swig" ON )
option ( LINK_PYTHON_LIBRARY "Link against python libraries" ON )
if ( PYTHON_BINDINGS )
- find_package ( SWIG )
+ # workaround for cmake bug #0013449
+ if ( NOT DEFINED CMAKE_FIND_ROOT_PATH )
+ find_package ( SWIG )
+ else ()
+ find_program ( SWIG_EXECUTABLE NAMES swig2.0 swig )
+ if ( SWIG_EXECUTABLE )
+ set ( SWIG_USE_FILE ${CMAKE_ROOT}/Modules/UseSWIG.cmake )
+ set ( SWIG_FOUND TRUE )
+ endif ()
+ endif ()
find_package ( PythonLibs )
find_package ( PythonInterp )
endif ()