Skip to content

Instantly share code, notes, and snippets.

@trondeau
Created February 16, 2016 16:17
Show Gist options
  • Save trondeau/5dd9f1ce8a0b2e613d2c to your computer and use it in GitHub Desktop.
Save trondeau/5dd9f1ce8a0b2e613d2c to your computer and use it in GitHub Desktop.
Finding binaries not in xcompile path
diff --git a/cmake/Modules/FindThrift.cmake b/cmake/Modules/FindThrift.cmake
index 5963ce9..e5a8df1 100644
--- a/cmake/Modules/FindThrift.cmake
+++ b/cmake/Modules/FindThrift.cmake
@@ -35,7 +35,7 @@ FIND_LIBRARY(THRIFT_LIBRARIES
# Get the thrift binary to build our files during cmake
if (CMAKE_CROSSCOMPILING)
- set(THRIFT_BIN "/usr/bin/thrift")
+ FIND_PROGRAM(THRIFT_BIN thrift NO_CMAKE_FIND_ROOT_PATH)
else (CMAKE_CROSSCOMPILING)
FIND_PROGRAM(THRIFT_BIN thrift)
endif(CMAKE_CROSSCOMPILING)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment