CMakeLists.txt 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. CMAKE_MINIMUM_REQUIRED (VERSION 2.8)
  2. PROJECT (FILVAL CXX)
  3. OPTION(BUILD_EXAMPLES "Build the demonstration programs" ON)
  4. SET(BUILD_SHARED_LIBS ON)
  5. ADD_SUBDIRECTORY(yaml-cpp)
  6. # Declare semantic versioning for FILVAL
  7. SET(FILVAL_VERSION_MAJOR 2)
  8. SET(FILVAL_VERSION_MINOR 0)
  9. SET(FILVAL_VERSION_PATCH 0)
  10. CONFIGURE_FILE (
  11. "${PROJECT_SOURCE_DIR}/include/filval.hpp"
  12. "${PROJECT_BINARY_DIR}/include/filval.hpp"
  13. )
  14. LIST( APPEND CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/cmake )
  15. FIND_PACKAGE(ROOT REQUIRED)
  16. INCLUDE_DIRECTORIES( SYSTEM ${ROOT_INCLUDE_DIR} include/ root/include/ yaml-cpp/include/ )
  17. # Adds the dictionary library for additonal type serialization
  18. SET( CLINGDICTFILE ${CMAKE_CURRENT_BINARY_DIR}/clingdict.cpp )
  19. ROOT_GENERATE_DICTIONARY( "" ${CMAKE_CURRENT_SOURCE_DIR}/root/include/LinkDef.hpp ${CLINGDICTFILE} "" )
  20. ADD_LIBRARY( filval SHARED ${CLINGDICTFILE} )
  21. #SET(EXE_LIBS filval ${ROOT_LIBRARIES} ${PROJECT_BINARY_DIR}/libyaml-cpp.so)
  22. IF (BUILD_EXAMPLES)
  23. ADD_EXECUTABLE(example1 examples/example1.cpp)
  24. TARGET_LINK_LIBRARIES(example1 ${ROOT_LIBRARIES} yaml-cpp)
  25. ENDIF()