GperfCMakeLists.txt 737 B

12345678910111213141516171819202122232425262728293031
  1. cmake_minimum_required(VERSION 2.8.12)
  2. project(gperf LANGUAGES C CXX)
  3. add_executable(gperf
  4. lib/getline.cc
  5. lib/hash.cc
  6. lib/getopt.c
  7. lib/getopt1.c
  8. src/version.cc
  9. src/positions.cc
  10. src/options.cc
  11. src/keyword.cc
  12. src/keyword-list.cc
  13. src/input.cc
  14. src/bool-array.cc
  15. src/hash-table.cc
  16. src/search.cc
  17. src/output.cc
  18. src/main.cc)
  19. include_directories(lib)
  20. # Copy the config.h template without modifying it
  21. # because none of the definitions are necessary
  22. execute_process(COMMAND ${CMAKE_COMMAND} -E copy ${CMAKE_SOURCE_DIR}/src/config.h.in ${CMAKE_BINARY_DIR}/config/config.h)
  23. include_directories(${CMAKE_BINARY_DIR}/config)
  24. include(GNUInstallDirs)
  25. install(TARGETS gperf
  26. RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})