1234567891011121314151617181920212223242526272829303132333435363738394041 |
- # CMakeLists.txt for FAS package. It creates a library with dictionary and a main program
- cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
- project(FlowCheck LANGUAGES CXX)
- list(APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS})
- #---Locate the ROOT package and defines a number of variables (e.g. ROOT_INCLUDE_DIRS)
- find_package(ROOT REQUIRED COMPONENTS MathCore RIO Hist Tree Net MathMore EG)
- #---Define useful ROOT functions and macros (e.g. ROOT_GENERATE_DICTIONARY)
- include(${ROOT_USE_FILE})
- #---Add PicoDst submodule with PicoDst shared library
- find_library(PicoDst NAMES PicoDst PATHS ${PICO_DST_BIN})
- if (NOT PicoDst)
- message(FATAL_ERROR "PicoDst is not found!")
- endif()
- set (CMAKE_CXX_STANDARD 11)
- add_definitions(${ROOT_CXX_FLAGS})
- set(CMAKE_BUILD_TYPE Debug)
- set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -O2 -Wall -g")
- set(Project_include_dirs
- ${CMAKE_SOURCE_DIR}
- ${ROOT_INCLUDE_DIRS}
- $ENV{PICO_DST_INC}
- )
- include_directories(${Project_include_dirs})
- set(Project_include_libs
- ${PicoDst}
- ${ROOT_LIBRARIES}
- )
- #---Compile executables
- add_executable(run main.cpp)
- target_link_libraries(run ${Project_include_libs})
|