CMakeLists.txt 913 B

12345678910111213141516171819202122232425262728
  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. # TODO 2: Use add_subdirectory() to add MathFunctions to this project
  11. # add the executable
  12. add_executable(Tutorial tutorial.cxx)
  13. # TODO 3: Use target_link_libraries to link the library to our executable
  14. # TODO 4: Add MathFunctions to Tutorial's target_include_directories()
  15. # Hint: ${PROJECT_SOURCE_DIR} is a path to the project source. AKA This folder!
  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. )