THRIFT-2925 CMake build does not work with OpenSSL nor anything installed in non-system location
This diff fixes them by correcting invalid CMake variable names:
* OPENSSL_... rather than OpenSSL_...
* LIBEVENT_... rather than Libevent_...
* Boost_INCLUDE_DIRS rather than Boost_INCLUDE_DIR
* LIBEVENT_INCLUDE_DIRS rather than LIBEVENT_INCLUDE_DIR
* ZLIB_INCLUDE_DIRS rather than ZLIB_INCLUDE_DIR
Note:
* OPENSSL_INCLUDE_DIR is correct (rather than ..._DIRS)
* Boost_INCLUDE_DIR exists and actually works for most cases but
Boost_INCLUDE_DIRS is the one desinged to be included
Also, library headers are now included as SYSTEM headers.
diff --git a/lib/cpp/test/CMakeLists.txt b/lib/cpp/test/CMakeLists.txt
index b524dd7..d218da9 100644
--- a/lib/cpp/test/CMakeLists.txt
+++ b/lib/cpp/test/CMakeLists.txt
@@ -21,7 +21,7 @@
# Find required packages
set(Boost_USE_STATIC_LIBS ON) # Force the use of static boost test framework
find_package(Boost 1.53.0 REQUIRED COMPONENTS unit_test_framework)
-include_directories("${Boost_INCLUDE_DIR}")
+include_directories(SYSTEM "${Boost_INCLUDE_DIRS}")
#Make sure gen-cpp files can be included
include_directories("${CMAKE_CURRENT_BINARY_DIR}")