build/cmake/ThriftConfig.cmake.in: Allow cmake users to override 'THRIFT_COMPILER'
diff --git a/build/cmake/ThriftConfig.cmake.in b/build/cmake/ThriftConfig.cmake.in
index f82c0a5..c055200 100644
--- a/build/cmake/ThriftConfig.cmake.in
+++ b/build/cmake/ThriftConfig.cmake.in
@@ -24,7 +24,9 @@
set_and_check(THRIFT_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
set_and_check(THRIFT_CMAKE_DIR "@PACKAGE_CMAKE_INSTALL_DIR@")
set_and_check(THRIFT_BIN_DIR "@PACKAGE_BIN_INSTALL_DIR@")
-set(THRIFT_COMPILER "${THRIFT_BIN_DIR}/thrift@CMAKE_EXECUTABLE_SUFFIX@")
+if(NOT DEFINED THRIFT_COMPILER)
+ set(THRIFT_COMPILER "${THRIFT_BIN_DIR}/thrift@CMAKE_EXECUTABLE_SUFFIX@")
+endif()
if (NOT TARGET thrift::thrift)
include("${THRIFT_CMAKE_DIR}/thriftTargets.cmake")