Advertisement
Guest User

Untitled

a guest
Jun 27th, 2017
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CMake 0.91 KB | None | 0 0
  1. cmake_minimum_required (VERSION 2.6)
  2. project (Tutorial)
  3.  
  4. # The version number.
  5. set (Tutorial_VERSION_MAJOR 1)
  6. set (Tutorial_VERSION_MINOR 0)
  7.  
  8. # should we use our own math functions
  9. option(USE_MYMATH "Use tutorial provided math implementation" ON)
  10.  
  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.   )
  17.  
  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}")
  21.  
  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 ()
  28.  
  29. # add the executable
  30. add_executable (Tutorial tutorial.cxx)
  31. target_link_libraries (Tutorial  ${EXTRA_LIBS})
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement