Repository: nifi-minifi-cpp
Updated Branches:
  refs/heads/master 09d973baf -> b12b96641


MINIFI-198: Update root CMAKE so testing can occur

Update root CMake to bring OpenSSL location to top level.
Keeping find_package(...) in libminifi CMakeLists.txt to
avoid issues building only libminifi.

This closes #49.

Signed-off-by: Aldrin Piri <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/repo
Commit: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/commit/b12b9664
Tree: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/tree/b12b9664
Diff: http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/diff/b12b9664

Branch: refs/heads/master
Commit: b12b96641d20d06d26fe3b7d5dc213ab2d74bfa9
Parents: 09d973b
Author: Marc Parisi <[email protected]>
Authored: Mon Feb 13 08:40:10 2017 -0500
Committer: Aldrin Piri <[email protected]>
Committed: Mon Feb 13 12:36:42 2017 -0500

----------------------------------------------------------------------
 CMakeLists.txt | 19 ++++++++++++++++++-
 1 file changed, 18 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/nifi-minifi-cpp/blob/b12b9664/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/CMakeLists.txt b/CMakeLists.txt
index f19431e..8eba073 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -56,9 +56,24 @@ else()
 set(OPENSSL_ROOT_DIR "/usr/lib/x86_64-linux-gnu")
 endif()
 
+# Include OpenSSL 
+find_package (OpenSSL REQUIRED)
+if (OPENSSL_FOUND)
+       include_directories(${OPENSSL_INCLUDE_DIR})
+else ()
+    message( FATAL_ERROR "OpenSSL was not found. Please install OpenSSL" )
+endif (OPENSSL_FOUND)
+
 # Provide custom modules for the project
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
 
+# Include LevelDB
+find_package (Leveldb REQUIRED)
+if (LEVELDB_FOUND)
+        include_directories(${LEVELDB_INCLUDE_DIRS})
+else ()
+    message( FATAL_ERROR "LevelDB was not found. Please install LevelDB" )
+endif (LEVELDB_FOUND)
 find_package(UUID REQUIRED)
 file(GLOB SPD_SOURCES "include/spdlog/*")
 
@@ -66,6 +81,7 @@ add_subdirectory(thirdparty/yaml-cpp-yaml-cpp-0.5.3)
 add_subdirectory(libminifi)
 add_subdirectory(main)
 
+
 # Generate source assembly
 set(ASSEMBLY_BASE_NAME 
"${CMAKE_PROJECT_NAME}-${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}")
 set(CPACK_SOURCE_GENERATOR "TGZ")
@@ -104,7 +120,8 @@ enable_testing(test)
     add_executable(tests ${LIBMINIFI_TEST_SOURCES} ${SPD_SOURCES})
     target_include_directories(tests PRIVATE BEFORE "thirdparty/catch")
     target_include_directories(tests PRIVATE BEFORE 
"thirdparty/yaml-cpp-yaml-cpp-0.5.3/include")
+    target_include_directories(tests PRIVATE BEFORE ${LEVELDB_INCLUDE_DIRS})
     target_include_directories(tests PRIVATE BEFORE "include")
     target_include_directories(tests PRIVATE BEFORE "libminifi/include/")
-    target_link_libraries(tests ${CMAKE_THREAD_LIBS_INIT} ${UUID_LIBRARIES} 
minifi yaml-cpp)
+    target_link_libraries(tests ${CMAKE_THREAD_LIBS_INIT} ${UUID_LIBRARIES} 
${LEVELDB_LIBRARIES} ${OPENSSL_LIBRARIES} minifi yaml-cpp)
     add_test(NAME LibMinifiTests COMMAND tests)

Reply via email to