CMakeLists.txt 762 B

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