cmake_minimum_required(VERSION 3.10 FATAL_ERROR) # ------------ reuse ROOT configurations ---------- if(NOT DEFINED GO4_ROOT_DIR) find_package(ROOT REQUIRED) include(${ROOT_USE_FILE}) elseif(EXISTS ${GO4_ROOT_DIR}/cmake/ROOTUseFile.cmake) include(${GO4_ROOT_DIR}/cmake/ROOTUseFile.cmake) elseif(EXISTS ${GO4_ROOT_DIR}/ROOTUseFile.cmake) include(${GO4_ROOT_DIR}/ROOTUseFile.cmake) else() message(FATAL_ERROR "Not found ROOT with ROOTUseFile.cmake") endif() #---Define the Standard Go4 macros -------------- include(${CMAKE_CURRENT_LIST_DIR}/Go4Macros.cmake) #---Set Link and include directories--- include_directories(${GO4_INCLUDE_DIR}) link_directories(${GO4_LIBRARY_DIR}) #---Set Flags--- add_definitions(-D${GO4_PLATFORM} ${GO4_DEFINITIONS}) set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GO4_CXX_FLAGS}") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${GO4_C_FLAGS}")