# CmakeFlis file for the NPA project cmake_minimum_required(VERSION VERSION 2.8.9 FATAL_ERROR) project (NPA) # Set invormation set(NPA_VERSION 3.0) set(NPA_AUTHOR "J. P. Araque ") # Require c++11 support set(CMAKE_CXX_STANDARD 11) # Check that ROOT in installed in the system if(EXISTS "$ENV{ROOTSYS}/CMakeFiles") # ROOT has been compiled with CMake list(APPEND CMAKE_PREFIX_PATH $ENV{ROOTSYS}) else() #ROOT has been compiled with traditional configure/make set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "$ENV{ROOTSYS}/ect/cmake/") endif() find_package(ROOT REQUIRED) # Define configuration file configure_file(${CMAKE_SOURCE_DIR}/base/NPAConfig.h.in ${CMAKE_SOURCE_DIR}/base/NPAConfig.h) # Generate setup script configure_file(${CMAKE_SOURCE_DIR}/bin/tmp.setup.sh ${CMAKE_SOURCE_DIR}/bin/setup.sh) # Go through the subidrectories and perform build set(NPA_SUBDIRS tools base plots) foreach (_dir ${NPA_SUBDIRS}) include_directories(${_dir}) add_subdirectory(${_dir}) endforeach()