diff options
Diffstat (limited to 'methods')
-rw-r--r-- | methods/CMakeLists.txt | 17 | ||||
-rw-r--r-- | methods/curl.cc (renamed from methods/https.cc) | 2 | ||||
-rw-r--r-- | methods/curl.h (renamed from methods/https.h) | 0 |
3 files changed, 13 insertions, 6 deletions
diff --git a/methods/CMakeLists.txt b/methods/CMakeLists.txt index 9f01ec506..3ae3f9963 100644 --- a/methods/CMakeLists.txt +++ b/methods/CMakeLists.txt @@ -7,7 +7,7 @@ add_executable(cdrom cdrom.cc) add_executable(http http.cc http_main.cc rfc2553emu.cc connect.cc basehttp.cc) add_executable(mirror mirror.cc http.cc rfc2553emu.cc connect.cc basehttp.cc) if (HAVE_CURL) - add_executable(https https.cc basehttp.cc) + add_executable(curl curl.cc basehttp.cc) endif() add_executable(ftp ftp.cc rfc2553emu.cc connect.cc) add_executable(rred rred.cc) @@ -16,7 +16,7 @@ add_executable(rsh rsh.cc) target_compile_definitions(http PRIVATE ${GNUTLS_DEFINITIONS}) target_include_directories(http PRIVATE ${GNUTLS_INCLUDE_DIR}) if (HAVE_CURL) -target_include_directories(https PRIVATE ${CURL_INCLUDE_DIRS}) +target_include_directories(curl PRIVATE ${CURL_INCLUDE_DIRS}) endif() # Link the executables against the libraries @@ -28,7 +28,7 @@ target_link_libraries(cdrom apt-pkg) target_link_libraries(http apt-pkg ${GNUTLS_LIBRARIES}) target_link_libraries(mirror apt-pkg ${RESOLV_LIBRARIES} ${GNUTLS_LIBRARIES}) if (HAVE_CURL) - target_link_libraries(https apt-pkg ${CURL_LIBRARIES}) + target_link_libraries(curl apt-pkg ${CURL_LIBRARIES}) endif() target_link_libraries(ftp apt-pkg ${GNUTLS_LIBRARIES}) target_link_libraries(rred apt-pkg) @@ -40,8 +40,15 @@ install(TARGETS file copy store gpgv cdrom http ftp rred rsh mirror add_slaves(${CMAKE_INSTALL_LIBEXECDIR}/apt/methods store gzip lzma bzip2 xz) add_slaves(${CMAKE_INSTALL_LIBEXECDIR}/apt/methods rsh ssh) -if (HAVE_CURL) - install(TARGETS https RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/apt/methods) + +set(curl_slaves curl+https curl+http) + +if (FORCE_CURL) + set(curl_slaves ${curl_slaves} https) else() add_slaves(${CMAKE_INSTALL_LIBEXECDIR}/apt/methods http https) endif() +if (HAVE_CURL) + install(TARGETS curl RUNTIME DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/apt/methods) + add_slaves(${CMAKE_INSTALL_LIBEXECDIR}/apt/methods curl ${curl_slaves}) +endif() diff --git a/methods/https.cc b/methods/curl.cc index 80ce048ca..ac3f77ab6 100644 --- a/methods/https.cc +++ b/methods/curl.cc @@ -33,7 +33,7 @@ #include <sstream> -#include "https.h" +#include "curl.h" #include <apti18n.h> /*}}}*/ diff --git a/methods/https.h b/methods/curl.h index fbbf34501..fbbf34501 100644 --- a/methods/https.h +++ b/methods/curl.h |