Skip to content
Snippets Groups Projects
Commit b972d5f5 authored by Orestis Afedulidis's avatar Orestis Afedulidis
Browse files

redirecting cmake find_package to ROOTSYS path

parent 2c91cf97
No related branches found
No related tags found
No related merge requests found
......@@ -5,19 +5,17 @@ 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}")
MESSAGE(STATUS "ROOTSYS is defined, trying to find package in this directory")
find_package(ROOT PATHS $ENV{ROOTSYS} NO_DEFAULT_PATH)
MESSAGE(STATUS "${ROOT_INCLUDE_DIRS}")
else()
MESSAGE(STATUS "ROOTSYS not defined using find_package(ROOT)")
find_package(ROOT)
MESSAGE(STATUS "${ROOT_INCLUDE_DIRS}")
endif()
find_package(Boost)
find_package(Boost COMPONENTS program_options unit_test_framework serialization filesystem timer REQUIRED)
find_package(GSL REQUIRED)
#include_directories(
......
......@@ -15,7 +15,7 @@ target_include_directories(FitParams
)
target_link_libraries(FitParams
${ROOT_LIBRARIES}/libMinuit2.so
ROOT::Minuit2
)
install(TARGETS FitParams
......@@ -38,7 +38,7 @@ target_link_libraries(StreamerTestApp
ConfigParser
qft++Extension
ErrLogger
${ROOT_LIBRARIES}/libMinuit2.so
ROOT::Minuit2
)
add_executable(PwaCovMatrixApp
......
......@@ -16,7 +16,7 @@ target_include_directories(KMatrixExtract
)
target_link_libraries(KMatrixExtract
${ROOT_LIBRARIES}/libMinuit2.so
ROOT::Minuit2
)
install(TARGETS KMatrixExtract
......
......@@ -25,7 +25,7 @@ target_link_libraries(MinFunctions
PwaDynamics
PspGen
PwaUtils
${ROOT_LIBRARIES}/libMinuit2.so
ROOT::Minuit2
${Boost_LIBRARIES}
)
......
......@@ -20,7 +20,7 @@ target_link_libraries(PwaDynamics
qft++
qft++Extension
ErrLogger
${ROOT_LIBRARIES}/libMinuit2.so
ROOT::Minuit2
)
install(TARGETS PwaDynamics
......
......@@ -16,7 +16,7 @@ target_include_directories(ggUtils
)
target_link_libraries(ggUtils
${ROOT_LIBRARIES}/libMinuit2.so
ROOT::Minuit2
)
install(TARGETS ggUtils
......
......@@ -22,7 +22,7 @@ target_link_libraries(gslUtils
qft++
qft++Extension
ErrLogger
${ROOT_LIBRARIES}/libMinuit2.so
ROOT::Minuit2
GSL::gsl
GSL::gslcblas
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment