THRIFT-5097: Fix exported version in cmake module
Patch: Tobias Mayer
This closes #2010
diff --git a/build/cmake/ThriftConfig.cmake.in b/build/cmake/ThriftConfig.cmake.in
index c304da0..3fb208f 100644
--- a/build/cmake/ThriftConfig.cmake.in
+++ b/build/cmake/ThriftConfig.cmake.in
@@ -17,13 +17,14 @@
# under the License.
#
-set(THRIFT_VERSION ${thrift_VERSION})
+set(THRIFT_VERSION @thrift_VERSION@)
@PACKAGE_INIT@
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")
if (NOT TARGET thrift::thrift)
include("${THRIFT_CMAKE_DIR}/thriftTargets.cmake")
diff --git a/lib/cpp/CMakeLists.txt b/lib/cpp/CMakeLists.txt
index e92da60..9b987ae 100755
--- a/lib/cpp/CMakeLists.txt
+++ b/lib/cpp/CMakeLists.txt
@@ -151,7 +151,7 @@
ADD_PKGCONFIG_THRIFT(thrift)
if(WITH_LIBEVENT)
- find_package(Libevent REQUIRED) # Libevent comes with CMake support form upstream
+ find_package(Libevent REQUIRED) # Libevent comes with CMake support from upstream
include_directories(SYSTEM ${LIBEVENT_INCLUDE_DIRS})
ADD_LIBRARY_THRIFT(thriftnb ${thriftcppnb_SOURCES})