commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 18/21: controlport: better handling of Thri


From: git
Subject: [Commit-gnuradio] [gnuradio] 18/21: controlport: better handling of Thrift checks for cross-compiling.
Date: Sat, 9 May 2015 14:05:37 +0000 (UTC)

This is an automated email from the git hooks/post-receive script.

trondeau pushed a commit to branch android
in repository gnuradio.

commit 4ca7be31d2abe020a4d4f5154e5ccb2fb2c0751a
Author: Tom Rondeau <address@hidden>
Date:   Tue May 5 11:22:19 2015 -0400

    controlport: better handling of Thrift checks for cross-compiling.
    
    Use -DTHRIFT_BIN=`which thrift` to tell cmake the native thrift binary
    to use when compiling the thrift files. All we need from the cross
    compiled environment is the library itself.
---
 cmake/Modules/FindThrift.cmake | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/cmake/Modules/FindThrift.cmake b/cmake/Modules/FindThrift.cmake
index f12bce0..a75d01b 100644
--- a/cmake/Modules/FindThrift.cmake
+++ b/cmake/Modules/FindThrift.cmake
@@ -58,9 +58,14 @@ if(THRIFT_VERSION VERSION_LESS THRIFT_REQ_VERSION)
 endif(THRIFT_VERSION VERSION_LESS THRIFT_REQ_VERSION)
 
 
-# Check that Thrift for Python is available
-include(GrPython)
-GR_PYTHON_CHECK_MODULE("Thrift" thrift "1" PYTHON_THRIFT_FOUND)
+# If we're not cross-compiling, Check that Thrift for Python is
+# available. If we are, don't worry about Python.
+if(NOT CMAKE_CROSSCOMPILING)
+  include(GrPython)
+  GR_PYTHON_CHECK_MODULE("Thrift" thrift "1" PYTHON_THRIFT_FOUND)
+else(NOT CMAKE_CROSSCOMPILING)
+  set(PYTHON_THRIFT_FOUND True)
+endif(NOT CMAKE_CROSSCOMPILING)
 
 # Set to found if we've made it this far
 if(THRIFT_INCLUDE_DIRS AND THRIFT_LIBRARIES AND PYTHON_THRIFT_FOUND)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]