From cde6dcb595841c3ccf0a95481af68efb65257534 Mon Sep 17 00:00:00 2001
From: Whitney Armstrong <warmstrong@anl.gov>
Date: Wed, 8 Aug 2018 00:00:44 -0500
Subject: [PATCH] 	modified:   CMakeLists.txt 	modified:  
 src/CMakeLists.txt

---
 CMakeLists.txt     | 12 +++++++-----
 src/CMakeLists.txt |  3 ++-
 2 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 72db270..2bbf3cd 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,6 +4,9 @@ project(hcana VERSION 0.90 LANGUAGES CXX)
 
 option(HCANA_BUILTIN_PODD "Use built-in Podd submodule (default: YES)" OFF)
 
+find_package(ROOT 6.0 REQUIRED CONFIG)
+include(${ROOT_USE_FILE})
+
 #----------------------------------------------------------------------------
 # Set up Podd and ROOT dependencies
 if(HCANA_BUILTIN_PODD)
@@ -12,7 +15,6 @@ if(HCANA_BUILTIN_PODD)
     ${CMAKE_MODULE_PATH}
     )
   include(PoddCMakeEnv)
-  find_package(ROOT 5.10 REQUIRED)
 else()
   # Find Podd and register it as a dependency
   # This will also automatically set up ROOT
@@ -22,13 +24,13 @@ else()
 endif()
 
 # Register ROOT dependency - it's in our public interface
-config_add_dependency(ROOT 5.10)
+#config_add_dependency(ROOT 5.10)
 
 #----------------------------------------------------------------------------
 # Set up the compiler flags
-set_compiler_flags("${ROOT_CXX_FLAGS}")
-set_diagnostic_flags(WALL WEXTRA)
-report_build_info()
+#set_compiler_flags("${ROOT_CXX_FLAGS}")
+#set_diagnostic_flags(WALL WEXTRA)
+#report_build_info()
 
 #----------------------------------------------------------------------------
 # Install in GNU-style directory layout
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 9e2f440..feff7fd 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -89,11 +89,12 @@ install(TARGETS ${LIBNAME}
   RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
   )
 install(FILES ${allheaders} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
-install(DIRECTORY nlohmann DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
+#install(DIRECTORY nlohmann DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
 
 #----------------------------------------------------------------------------
 # libHallCDict
 build_root_dictionary(${LIBNAME} ${headers}
+  INCLUDEDIRS -I${CMAKE_CURRENT_SOURCE_DIR}
   TARGETS ${LIBNAME}
   LINKDEF ${linkdef}
   )
-- 
GitLab