summaryrefslogtreecommitdiff
path: root/cmake
diff options
context:
space:
mode:
authorTom Rondeau <tom@trondeau.com>2016-01-14 16:09:25 -0500
committerTom Rondeau <tom@trondeau.com>2016-02-16 16:13:35 -0500
commit9e2eb46fe625f4ac04cc3e85c791b5e9dd903689 (patch)
treed2eab8b5cad5993942e9999cf2d22bf7ffe8b802 /cmake
parent0369e2fde4ae2de7cbc1b426c3eb9e6fcb2c5a32 (diff)
cmake: cmake should get native thrift binary when cross compiling.
Diffstat (limited to 'cmake')
-rw-r--r--cmake/Modules/FindThrift.cmake6
1 files changed, 5 insertions, 1 deletions
diff --git a/cmake/Modules/FindThrift.cmake b/cmake/Modules/FindThrift.cmake
index 4702f90d78..e5a8df1304 100644
--- a/cmake/Modules/FindThrift.cmake
+++ b/cmake/Modules/FindThrift.cmake
@@ -34,7 +34,11 @@ FIND_LIBRARY(THRIFT_LIBRARIES
)
# Get the thrift binary to build our files during cmake
-FIND_PROGRAM(THRIFT_BIN thrift)
+if (CMAKE_CROSSCOMPILING)
+ FIND_PROGRAM(THRIFT_BIN thrift NO_CMAKE_FIND_ROOT_PATH)
+else (CMAKE_CROSSCOMPILING)
+ FIND_PROGRAM(THRIFT_BIN thrift)
+endif(CMAKE_CROSSCOMPILING)
# Use binary to get version string and test against THRIFT_REQ_VERSION
EXECUTE_PROCESS(