CMakeLists.txt 643 B

123456789101112131415161718192021222324
  1. cmake_minimum_required(VERSION 3.3)
  2. project(Tutorial)
  3. set(CMAKE_CXX_STANDARD 14)
  4. # set the version number
  5. set(Tutorial_VERSION_MAJOR 1)
  6. set(Tutorial_VERSION_MINOR 0)
  7. # configure a header file to pass some of the CMake settings
  8. # to the source code
  9. configure_file(
  10. "${PROJECT_SOURCE_DIR}/TutorialConfig.h.in"
  11. "${PROJECT_BINARY_DIR}/TutorialConfig.h"
  12. )
  13. # add the executable
  14. add_executable(Tutorial tutorial.cxx)
  15. # add the binary tree to the search path for include files
  16. # so that we will find TutorialConfig.h
  17. target_include_directories(Tutorial PUBLIC
  18. "${PROJECT_BINARY_DIR}"
  19. )