diff options
Diffstat (limited to 'methods')
-rw-r--r-- | methods/CMakeLists.txt | 35 | ||||
-rw-r--r-- | methods/makefile | 110 |
2 files changed, 35 insertions, 110 deletions
diff --git a/methods/CMakeLists.txt b/methods/CMakeLists.txt new file mode 100644 index 000000000..2417c4dc1 --- /dev/null +++ b/methods/CMakeLists.txt @@ -0,0 +1,35 @@ +# 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(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 -lresolv) +target_link_libraries(https apt-pkg ${CURL_LIBRARIES}) +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) diff --git a/methods/makefile b/methods/makefile deleted file mode 100644 index 3274e9279..000000000 --- a/methods/makefile +++ /dev/null @@ -1,110 +0,0 @@ -# -*- make -*- -BASE=.. -SUBDIR=methods - -# Bring in the default rules -include ../buildlib/defaults.mak -BIN := $(BIN)/methods - -include ../buildlib/libversion.mak -APT_DOMAIN := apt - -# The file method -PROGRAM=file -SLIBS = -lapt-pkg $(INTLLIBS) -LIB_MAKES = apt-pkg/makefile -SOURCE = file.cc -include $(PROGRAM_H) - -# The copy method -PROGRAM=copy -SLIBS = -lapt-pkg $(INTLLIBS) -LIB_MAKES = apt-pkg/makefile -SOURCE = copy.cc -include $(PROGRAM_H) - -# The store method -PROGRAM=store -SLIBS = -lapt-pkg $(INTLLIBS) -LIB_MAKES = apt-pkg/makefile -SOURCE = store.cc -include $(PROGRAM_H) - -# The gpgv method -PROGRAM=gpgv -SLIBS = -lapt-pkg $(INTLLIBS) -LIB_MAKES = apt-pkg/makefile -SOURCE = gpgv.cc -include $(PROGRAM_H) - -# The cdrom method -PROGRAM=cdrom -SLIBS = -lapt-pkg $(INTLLIBS) -LIB_MAKES = apt-pkg/makefile -SOURCE = cdrom.cc -include $(PROGRAM_H) - -# The http method -PROGRAM=http -SLIBS = -lapt-pkg $(SOCKETLIBS) $(INTLLIBS) -lresolv -LIB_MAKES = apt-pkg/makefile -SOURCE = http.cc http_main.cc rfc2553emu.cc connect.cc server.cc -include $(PROGRAM_H) - -# The https method -PROGRAM=https -SLIBS = -lapt-pkg -lcurl $(INTLLIBS) -lresolv -LIB_MAKES = apt-pkg/makefile -SOURCE = https.cc server.cc -include $(PROGRAM_H) - -# The ftp method -PROGRAM=ftp -SLIBS = -lapt-pkg $(SOCKETLIBS) $(INTLLIBS) -lresolv -LIB_MAKES = apt-pkg/makefile -SOURCE = ftp.cc rfc2553emu.cc connect.cc -include $(PROGRAM_H) - -# The rred method -PROGRAM=rred -SLIBS = -lapt-pkg $(SOCKETLIBS) $(INTLLIBS) -LIB_MAKES = apt-pkg/makefile -SOURCE = rred.cc -include $(PROGRAM_H) - -# The rsh method -PROGRAM=rsh -SLIBS = -lapt-pkg $(INTLLIBS) -LIB_MAKES = apt-pkg/makefile -SOURCE = rsh.cc -include $(PROGRAM_H) - -# The mirror method -PROGRAM=mirror -SLIBS = -lapt-pkg $(SOCKETLIBS) -lresolv -LIB_MAKES = apt-pkg/makefile -SOURCE = mirror.cc http.cc rfc2553emu.cc connect.cc server.cc -include $(PROGRAM_H) - -# SSH method symlink -binary: $(BIN)/ssh -veryclean: clean-$(BIN)/ssh - -$(BIN)/ssh: - echo "Installing ssh method link" - ln -fs rsh $(BIN)/ssh -clean-$(BIN)/ssh: - -rm $(BIN)/ssh - -# create compat links for all compressors -COMPRESSORS=gzip bzip2 lzma xz - -binary: $(addprefix $(BIN)/,$(COMPRESSORS)) -veryclean: $(addprefix clean-$(BIN)/,$(COMPRESSORS)) - -$(addprefix $(BIN)/,$(COMPRESSORS)): $(BIN)/store - echo "Installing $(notdir $@) method link" - ln -fs store $@ - -$(addprefix clean-$(BIN)/,$(COMPRESSORS)): - -rm $(BIN)/$(notdir $@) |