CMakeLists.txt 691 B

123456789101112131415161718192021222324
  1. # first we add the executable that generates the table
  2. add_executable(MakeTable MakeTable.cxx)
  3. # add the command to generate the source code
  4. add_custom_command (
  5. OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/Table.h
  6. DEPENDS MakeTable
  7. COMMAND MakeTable
  8. ARGS ${CMAKE_CURRENT_BINARY_DIR}/Table.h
  9. )
  10. set_source_files_properties (
  11. mysqrt.cxx PROPERTIES
  12. OBJECT_DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/Table.h
  13. )
  14. # add the binary tree directory to the search path for include files
  15. include_directories( ${CMAKE_CURRENT_BINARY_DIR} )
  16. # add the main library
  17. add_library(MathFunctions mysqrt.cxx)
  18. install (TARGETS MathFunctions DESTINATION bin)
  19. install (FILES MathFunctions.h DESTINATION include)