123456789101112131415161718192021222324252627282930313233343536373839 |
- # CMakeLists.txt for event package. It creates a library with dictionary and a
- # main program
- cmake_minimum_required(VERSION 3.1 FATAL_ERROR)
- project(ModelTree)
- set (CMAKE_CXX_STANDARD 11)
- # You need to tell CMake where to find the ROOT installation. This can be done
- # in a number of ways:
- # - ROOT built with classic configure/make use the provided
- # $ROOTSYS/etc/cmake/FindROOT.cmake
- # - ROOT built with CMake. Add in CMAKE_PREFIX_PATH the installation prefix
- # for ROOT
- 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)
- #---Define useful ROOT functions and macros (e.g. ROOT_GENERATE_DICTIONARY)
- include(${ROOT_USE_FILE})
- set(INCLUDE_DIRECTORIES
- ${CMAKE_SOURCE_DIR}
- ${CMAKE_SOURCE_DIR}/Centrality
- ${CMAKE_SOURCE_DIR}/Flow
- ${ROOT_INCLUDE_DIRS})
- include_directories(${INCLUDE_DIRECTORIES})
- add_definitions(${ROOT_CXX_FLAGS})
- set(CMAKE_BUILD_TYPE Debug)
- set(CMAKE_C_FLAGS "-O2")
- add_subdirectory(Centrality)
- add_subdirectory(Flow)
- add_executable(calcCent calcCent.cpp)
- target_link_libraries(calcCent Centrality)
|