CMakeLists.txt 615 B

123456789101112131415161718192021
  1. cmake_minimum_required(VERSION 3.10)
  2. # set the project name and version
  3. project(Tutorial VERSION 1.0)
  4. # specify the C++ standard
  5. set(CMAKE_CXX_STANDARD 11)
  6. set(CMAKE_CXX_STANDARD_REQUIRED True)
  7. # configure a header file to pass some of the CMake settings
  8. # to the source code
  9. configure_file(TutorialConfig.h.in TutorialConfig.h)
  10. # add the executable
  11. add_executable(Tutorial tutorial.cxx)
  12. # add the binary tree to the search path for include files
  13. # so that we will find TutorialConfig.h
  14. target_include_directories(Tutorial PUBLIC
  15. "${PROJECT_BINARY_DIR}"
  16. )