From f3de2dbaf657f9040a4da448c57267de0fef7d33 Mon Sep 17 00:00:00 2001 From: Julian Andres Klode Date: Sat, 6 Aug 2016 21:03:43 +0200 Subject: CMake: Add basic CMake build system Introduce an initial CMake buildsystem. This build system can build a fully working apt system without translation or documentation. The FindBerkelyDB module is from kdelibs, with some small adjustements to also look in db5 directories. Initial work on this CMake build system started in 2009, and was resumed in August 2016. --- methods/CMakeLists.txt | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 methods/CMakeLists.txt (limited to 'methods') 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) -- cgit v1.2.3