Skip to content

Commit 9e2eb46

Browse files
committedFeb 16, 2016
cmake: cmake should get native thrift binary when cross compiling.
1 parent 0369e2f commit 9e2eb46

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed
 

‎cmake/Modules/FindThrift.cmake

+5-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,11 @@ FIND_LIBRARY(THRIFT_LIBRARIES
3434
)
3535

3636
# Get the thrift binary to build our files during cmake
37-
FIND_PROGRAM(THRIFT_BIN thrift)
37+
if (CMAKE_CROSSCOMPILING)
38+
FIND_PROGRAM(THRIFT_BIN thrift NO_CMAKE_FIND_ROOT_PATH)
39+
else (CMAKE_CROSSCOMPILING)
40+
FIND_PROGRAM(THRIFT_BIN thrift)
41+
endif(CMAKE_CROSSCOMPILING)
3842

3943
# Use binary to get version string and test against THRIFT_REQ_VERSION
4044
EXECUTE_PROCESS(

0 commit comments

Comments
 (0)
Please sign in to comment.