1 cmake_minimum_required (VERSION 2.6)
5 set (Tutorial_VERSION_MAJOR 1)
6 set (Tutorial_VERSION_MINOR 0)
8 # should we use our own math functions
9 option(USE_MYMATH "Use tutorial provided math implementation" ON)
11 # configure a header file to pass some of the CMake settings
14 "${PROJECT_SOURCE_DIR}/TutorialConfig.h.in"
15 "${PROJECT_BINARY_DIR}/TutorialConfig.h"
18 # add the binary tree to the search path for include files
19 # so that we will find TutorialConfig.h
20 include_directories ("${PROJECT_BINARY_DIR}")
22 # add the MathFunctions library?
24 include_directories ("${PROJECT_SOURCE_DIR}/MathFunctions")
25 add_subdirectory (MathFunctions)
26 set (EXTRA_LIBS ${EXTRA_LIBS} MathFunctions)
30 add_executable (Tutorial tutorial.cxx)
31 target_link_libraries (Tutorial ${EXTRA_LIBS})