CMakeLists.txt 1.3 KB

123456789101112131415161718192021222324252627282930313233343536
  1. # Create the executable targets
  2. add_executable(file file.cc)
  3. add_executable(copy copy.cc)
  4. add_executable(store store.cc)
  5. add_executable(gpgv gpgv.cc)
  6. add_executable(cdrom cdrom.cc)
  7. add_executable(http http.cc http_main.cc rfc2553emu.cc connect.cc server.cc)
  8. add_executable(mirror mirror.cc http.cc rfc2553emu.cc connect.cc server.cc)
  9. add_executable(https https.cc server.cc)
  10. add_executable(ftp ftp.cc rfc2553emu.cc connect.cc)
  11. add_executable(rred rred.cc)
  12. add_executable(rsh rsh.cc)
  13. # Add target-specific header directories
  14. target_include_directories(https PRIVATE ${CURL_INCLUDE_DIRS})
  15. # Link the executables against the libraries
  16. target_link_libraries(file apt-pkg)
  17. target_link_libraries(copy apt-pkg)
  18. target_link_libraries(store apt-pkg)
  19. target_link_libraries(gpgv apt-pkg)
  20. target_link_libraries(cdrom apt-pkg)
  21. target_link_libraries(http apt-pkg)
  22. target_link_libraries(mirror apt-pkg ${RESOLV_LIBRARIES})
  23. target_link_libraries(https apt-pkg ${CURL_LIBRARIES})
  24. target_link_libraries(ftp apt-pkg)
  25. target_link_libraries(rred apt-pkg)
  26. target_link_libraries(rsh apt-pkg)
  27. # Install the library
  28. install(TARGETS file copy store gpgv cdrom http https ftp rred rsh mirror
  29. RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/apt/methods)
  30. add_slaves(${CMAKE_INSTALL_LIBEXECDIR}/apt/methods store gzip lzma bzip2 xz)
  31. add_slaves(${CMAKE_INSTALL_LIBEXECDIR}/apt/methods rsh ssh)