CMAKE_MINIMUM_REQUIRED (VERSION 2.8) PROJECT (FILVAL CXX) OPTION(BUILD_EXAMPLES "Build the demonstration programs" OFF) SET(BUILD_SHARED_LIBS ON) ADD_SUBDIRECTORY(yaml-cpp) # Declare semantic versioning for FILVAL SET(FILVAL_VERSION_MAJOR 2) SET(FILVAL_VERSION_MINOR 0) SET(FILVAL_VERSION_PATCH 0) CONFIGURE_FILE ( "${PROJECT_SOURCE_DIR}/include/filval.hpp" "${PROJECT_BINARY_DIR}/include/filval.hpp" ) LIST( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake ) FIND_PACKAGE(ROOT REQUIRED) INCLUDE_DIRECTORIES( SYSTEM ${ROOT_INCLUDE_DIR} include/ root/include/ yaml-cpp/include/ ) # Adds the dictionary library for additonal type serialization # SET( CLINGDICTFILE ${CMAKE_CURRENT_BINARY_DIR}/clingdict.cpp ) # ROOT_GENERATE_DICTIONARY( "" ${CMAKE_CURRENT_SOURCE_DIR}/root/include/LinkDef.hpp ${CLINGDICTFILE} "" ) # ADD_LIBRARY( filval SHARED ${CLINGDICTFILE} ) #SET(EXE_LIBS filval ${ROOT_LIBRARIES} ${PROJECT_BINARY_DIR}/libyaml-cpp.so) IF (BUILD_EXAMPLES) ADD_EXECUTABLE(example1 examples/example1.cpp) TARGET_LINK_LIBRARIES(example1 ${ROOT_LIBRARIES} yaml-cpp) ENDIF()