# Go4 CMake Configuration File for External Projects # Also used to compile all examples in the Go4 #----------------------------------------------------------------------- # Provide *recommended* compiler flags used by this build of Go4 # Don't mess with the actual CMAKE_CXX_FLAGS!!! # It's up to the user what to do with these # set(GO4_PLATFORM "@GO4_PLATFORM@") set(GO4_DEFINITIONS "@GO4_DEFINITIONS@") set(GO4_CXX_FLAGS "@GO4_CXX_FLAGS@") set(GO4_C_FLAGS "@GO4_C_FLAGS@") set(GO4_QTVERSION "@GO4_QTVERSION@") @SETTING_GO4_ROOT_DIR@ # ROOT configured for use from the build tree - absolute paths are used. set(GO4_INCLUDE_DIR ${CMAKE_CURRENT_LIST_DIR}/include) # ROOT configured for use from the build tree - absolute paths are used. set(GO4_LIBRARY_DIR ${CMAKE_CURRENT_LIST_DIR}/lib) # Deprecated value, please don't use it and use ROOT_BINDIR instead. set(GO4_BINARY_DIR ${CMAKE_CURRENT_LIST_DIR}/bin) set(GO4_USE_FILE ${CMAKE_CURRENT_LIST_DIR}/Go4UseFile.cmake) #------------ reuse ROOT configurations ------------------------------------------- # need to be defined to avoid error with some cmake version if(NOT DEFINED GO4_ROOT_DIR) find_package(ROOT REQUIRED) include(${ROOT_USE_FILE}) elseif(EXISTS ${GO4_ROOT_DIR}/cmake/ROOTConfig.cmake) set(ROOT_FIND_COMPONENTS "") include(${GO4_ROOT_DIR}/cmake/ROOTConfig.cmake) set(ROOT_FOUND 1) elseif(EXISTS ${GO4_ROOT_DIR}/ROOTConfig.cmake) set(ROOT_FIND_COMPONENTS "") include(${GO4_ROOT_DIR}/ROOTConfig.cmake) set(ROOT_FOUND 1) else() message(FATAL_ERROR "Not find ROOTConfig.cmake") endif() if(DEFINED ROOT_CXX_STANDARD) set(CMAKE_CXX_STANDARD ${ROOT_CXX_STANDARD}) endif() #---------------------------------------------------------------------------- if(MSVC) set(CMAKE_FIND_LIBRARY_PREFIXES "lib") set(CMAKE_FIND_LIBRARY_SUFFIXES ".lib" ".dll") endif() # search for extra ROOT libraries, used in user analysis or fitting foreach(_cpt Spectrum Minuit XMLIO HTTP) find_library(ROOT_${_cpt}_LIBRARY ${_cpt} HINTS ${ROOT_LIBRARY_DIR}) if(ROOT_${_cpt}_LIBRARY) mark_as_advanced(ROOT_${_cpt}_LIBRARY) endif() endforeach() # search for Go4 libraries foreach(_cpt Go4Fit Go4Base Go4ThreadManager Go4TaskHandler Go4AnalBase Go4Analysis Go4Widgets Go4QtRoot Go4WebRoot) find_library(${_cpt}_LIBRARY ${_cpt} HINTS ${GO4_LIBRARY_DIR}) if(${_cpt}_LIBRARY) mark_as_advanced(${_cpt}_LIBRARY) endif() endforeach()