Created
February 16, 2016 19:25
-
-
Save trondeau/04d6e4ac30b5656aaae1 to your computer and use it in GitHub Desktop.
FindThrift.cmake from gnuradio maint
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/cmake/Modules/FindThrift.cmake b/cmake/Modules/FindThrift.cmake | |
index 4702f90..e5a8df1 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( |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment