summaryrefslogtreecommitdiff
path: root/methods/CMakeLists.txt
blob: c4d28de640f37bbf478b24f7115911d1ac0df8de (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Create the executable targets
add_executable(file file.cc)
add_executable(copy copy.cc)
add_executable(store store.cc)
add_executable(gpgv gpgv.cc)
add_executable(cdrom cdrom.cc)
#add_executable(http http.cc http_main.cc rfc2553emu.cc connect.cc server.cc)
add_executable(http http.cc rfc2553emu.cc connect.cc server.cc)
#add_executable(mirror mirror.cc http.cc rfc2553emu.cc connect.cc server.cc)
add_executable(https https.cc server.cc)
add_executable(ftp ftp.cc rfc2553emu.cc connect.cc)
add_executable(rred rred.cc)
add_executable(rsh rsh.cc)

# Add target-specific header directories
target_include_directories(https PRIVATE ${CURL_INCLUDE_DIRS})

# Link the executables against the libraries
target_link_libraries(file apt-pkg)
target_link_libraries(copy apt-pkg)
target_link_libraries(store apt-pkg)
target_link_libraries(gpgv apt-pkg)
target_link_libraries(cdrom apt-pkg)
#target_link_libraries(http apt-pkg)
#target_link_libraries(mirror apt-pkg ${RESOLV_LIBRARIES})
target_link_libraries(https apt-pkg ${CURL_LIBRARIES})
target_link_libraries(http apt-pkg lockdown "-framework CoreFoundation" "-framework CFNetwork" "-framework SystemConfiguration")
target_link_libraries(ftp apt-pkg)
target_link_libraries(rred apt-pkg)
target_link_libraries(rsh apt-pkg)

# Install the library
install(TARGETS file copy store gpgv cdrom http https ftp rred rsh #mirror
        RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/apt/methods)

add_slaves(${CMAKE_INSTALL_LIBEXECDIR}/apt/methods store gzip lzma bzip2 xz)
add_slaves(${CMAKE_INSTALL_LIBEXECDIR}/apt/methods rsh ssh)