Merge pull request #2868 from BioDataAnalysis/emmenlau_fix_find_libevent_install

Do not install `FindLibevent.cmake` when libevent is disabled
diff --git a/build/cmake/GenerateConfigModule.cmake b/build/cmake/GenerateConfigModule.cmake
index 26f018a..597ffd8 100644
--- a/build/cmake/GenerateConfigModule.cmake
+++ b/build/cmake/GenerateConfigModule.cmake
@@ -40,6 +40,9 @@
 
 		install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ThriftConfig.cmake"
 						"${CMAKE_CURRENT_BINARY_DIR}/ThriftConfigVersion.cmake"
-						"${CMAKE_CURRENT_SOURCE_DIR}/build/cmake/FindLibevent.cmake"
 						DESTINATION "${CMAKE_INSTALL_DIR}/thrift")
+        if(WITH_LIBEVENT)
+            install(FILES "${CMAKE_CURRENT_SOURCE_DIR}/build/cmake/FindLibevent.cmake"
+                            DESTINATION "${CMAKE_INSTALL_DIR}/thrift")
+        endif()
 endif()