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