CMakeLists.txt 681 B

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