diff --git a/CMakeLists.txt b/CMakeLists.txt index ed0f63ded12f6904cdf5578e8f9f63ed1d67c620..476c97851d6d6f5417d8bda09acc6fb1ee5df90f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,9 +4,20 @@ project(Pawian) set(CXX_STANDARD 17) set(CXX_STANDARD_REQUIRED ON) +if(DEFINED ENV{ROOTSYS}) + set(ROOT_INCLUDE_DIRS "$ENV{ROOTSYS}/include") + set(ROOT_LIBRARIES "$ENV{ROOTSYS}/lib") + MESSAGE(STATUS "found env var ROOTSYS") + MESSAGE(STATUS "root include path is: ${ROOT_INCLUDE_DIRS}") + MESSAGE(STATUS "root lib path is: ${ROOT_LIBRARIES}") +else() + MESSAGE(STATUS "ROOTSYS not defined using find_package(ROOT)") + find_package(ROOT) +endif() + find_package(Boost) find_package(Boost COMPONENTS program_options unit_test_framework serialization filesystem timer REQUIRED) -find_package(ROOT) + find_package(GSL REQUIRED) #include_directories( diff --git a/FitParams/CMakeLists.txt b/FitParams/CMakeLists.txt index 7a7979373e55874b91661df3c4daf29887e42ac6..97b03d6853fcc815d9c8ee0d7b976cc55760a8ae 100644 --- a/FitParams/CMakeLists.txt +++ b/FitParams/CMakeLists.txt @@ -15,7 +15,7 @@ target_include_directories(FitParams ) target_link_libraries(FitParams - ROOT::Minuit2 + ${ROOT_LIBRARIES}/libMinuit2.so ) install(TARGETS FitParams @@ -38,7 +38,7 @@ target_link_libraries(StreamerTestApp ConfigParser qft++Extension ErrLogger - ROOT::Minuit2 + ${ROOT_LIBRARIES}/libMinuit2.so ) add_executable(PwaCovMatrixApp diff --git a/KMatrixExtract/CMakeLists.txt b/KMatrixExtract/CMakeLists.txt index 1c088fddc6e40a688c21d66a0941b319edad33c9..5f6198e3853afabccaeb21521133534cbfd8e6a3 100644 --- a/KMatrixExtract/CMakeLists.txt +++ b/KMatrixExtract/CMakeLists.txt @@ -16,7 +16,7 @@ target_include_directories(KMatrixExtract ) target_link_libraries(KMatrixExtract - ROOT::Minuit2 + ${ROOT_LIBRARIES}/libMinuit2.so ) install(TARGETS KMatrixExtract diff --git a/MinFunctions/CMakeLists.txt b/MinFunctions/CMakeLists.txt index 0f8eeee369c71d32e56e022de90f71a0bcaad55c..f3361de9947210be77c76ee38fdf78c25dfc5296 100644 --- a/MinFunctions/CMakeLists.txt +++ b/MinFunctions/CMakeLists.txt @@ -25,7 +25,7 @@ target_link_libraries(MinFunctions PwaDynamics PspGen PwaUtils - ROOT::Minuit2 + ${ROOT_LIBRARIES}/libMinuit2.so ${Boost_LIBRARIES} ) diff --git a/PwaDynamics/CMakeLists.txt b/PwaDynamics/CMakeLists.txt index 6156927d32c889a54eb029090fbc6769520091dc..18a06db397afe492014d4f5a897558f2ccdb9de2 100644 --- a/PwaDynamics/CMakeLists.txt +++ b/PwaDynamics/CMakeLists.txt @@ -20,7 +20,7 @@ target_link_libraries(PwaDynamics qft++ qft++Extension ErrLogger - ROOT::Minuit2 + ${ROOT_LIBRARIES}/libMinuit2.so ) install(TARGETS PwaDynamics diff --git a/ggUtils/CMakeLists.txt b/ggUtils/CMakeLists.txt index 358f59afc54b4d494a9171d2e5dc6440b5e5017d..c6c7efd8dff8eed39918f968414a2c3b9c2c6c88 100644 --- a/ggUtils/CMakeLists.txt +++ b/ggUtils/CMakeLists.txt @@ -16,7 +16,7 @@ target_include_directories(ggUtils ) target_link_libraries(ggUtils - ROOT::Minuit2 + ${ROOT_LIBRARIES}/libMinuit2.so ) install(TARGETS ggUtils diff --git a/gslUtils/CMakeLists.txt b/gslUtils/CMakeLists.txt index ea99d47864379bc08edaad39dd7167c0489a1a94..0495bd8731e50771ea7bcaa807ab1bf300fbbf0b 100644 --- a/gslUtils/CMakeLists.txt +++ b/gslUtils/CMakeLists.txt @@ -22,7 +22,7 @@ target_link_libraries(gslUtils qft++ qft++Extension ErrLogger - ROOT::Minuit2 + ${ROOT_LIBRARIES}/libMinuit2.so GSL::gsl GSL::gslcblas )