Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

CMakeLists.txt 1.1KB

12345678910111213141516171819202122232425262728
  1. cmake_minimum_required(VERSION 2.8)
  2. project(postsrsd C)
  3. find_program(HELP2MAN help2man DOC "path to help2man executable")
  4. find_program(DD dd DOC "path to dd executable")
  5. find_program(BASE64 base64 DOC "path to base64 executable")
  6. add_executable(${PROJECT_NAME} postsrsd.c sha1.c srs2.c)
  7. get_target_property(POSTSRSD ${PROJECT_NAME} LOCATION)
  8. get_filename_component(POSTSRSD ${POSTSRSD} NAME_WE)
  9. configure_file(${PROJECT_NAME}.init.in ${PROJECT_NAME}.init @ONLY)
  10. configure_file(postinstall.cmake.in postinstall.cmake @ONLY)
  11. if(HELP2MAN)
  12. add_custom_command(TARGET ${PROJECT_NAME} POST_BUILD
  13. COMMAND ${HELP2MAN} ARGS -s8 -o${PROJECT_NAME}.8 -N -h-h -v-v ./${PROJECT_NAME}
  14. VERBATIM
  15. )
  16. install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.8 DESTINATION "share/man/man8")
  17. endif()
  18. install(TARGETS ${PROJECT_NAME} DESTINATION "sbin")
  19. install(FILES README.md main.cf.ex DESTINATION "share/doc/${PROJECT_NAME}")
  20. install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.init DESTINATION "/etc/init.d" RENAME ${PROJECT_NAME})
  21. install(SCRIPT "${CMAKE_CURRENT_BINARY_DIR}/postinstall.cmake")