]> git.saurik.com Git - apt.git/blob - methods/CMakeLists.txt
test: Substitute GNU commands for other commands where available
[apt.git] / methods / CMakeLists.txt
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
14 # Add target-specific header directories
15 target_include_directories(https PRIVATE ${CURL_INCLUDE_DIRS})
16
17 # Link the executables against the libraries
18 target_link_libraries(file apt-pkg)
19 target_link_libraries(copy apt-pkg)
20 target_link_libraries(store apt-pkg)
21 target_link_libraries(gpgv apt-pkg)
22 target_link_libraries(cdrom apt-pkg)
23 target_link_libraries(http apt-pkg)
24 target_link_libraries(mirror apt-pkg ${RESOLV_LIBRARIES})
25 target_link_libraries(https apt-pkg ${CURL_LIBRARIES})
26 target_link_libraries(ftp apt-pkg)
27 target_link_libraries(rred apt-pkg)
28 target_link_libraries(rsh apt-pkg)
29
30 # Install the library
31 install(TARGETS file copy store gpgv cdrom http https ftp rred rsh mirror
32 RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/apt/methods)
33
34 add_slaves(${CMAKE_INSTALL_LIBEXECDIR}/apt/methods store gzip lzma bzip2 xz)
35 add_slaves(${CMAKE_INSTALL_LIBEXECDIR}/apt/methods rsh ssh)