Resync
[CMakeLuaTailorHgBridge.git] / CMakeLua / Tests / Tutorial / Step2 / CMakeLists.txt
blobc82b7df98d4fe95090ad183f42c864815c7bff78
1 cmake_minimum_required (VERSION 2.6)
2 project (Tutorial)
4 # The version number.
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
12 # to the source code
13 configure_file (
14   "${PROJECT_SOURCE_DIR}/TutorialConfig.h.in"
15   "${PROJECT_BINARY_DIR}/TutorialConfig.h"
16   )
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?
23 if (USE_MYMATH)
24   include_directories ("${PROJECT_SOURCE_DIR}/MathFunctions")
25   add_subdirectory (MathFunctions)
26   set (EXTRA_LIBS ${EXTRA_LIBS} MathFunctions)
27 endif (USE_MYMATH)
29 # add the executable
30 add_executable (Tutorial tutorial.cxx)
31 target_link_libraries (Tutorial  ${EXTRA_LIBS})