summaryrefslogtreecommitdiff
path: root/ftparchive
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-08-10 16:19:00 +0200
committerJulian Andres Klode <jak@debian.org>2016-08-10 16:19:00 +0200
commite02c3a9ec2b2f7a8d4aecd70f2ecdae27c207aa9 (patch)
treeffa99f96949f3eab728a1b8caecdd014ea8d6f81 /ftparchive
parentb2cfacf1180e4b3fcbb2ae2ea52cf270ef74e971 (diff)
parent61fef4ddbec8f70bb9e213ac0491d4e6cfefab30 (diff)
Merge branch 'cmake'
Diffstat (limited to 'ftparchive')
-rw-r--r--ftparchive/CMakeLists.txt10
-rw-r--r--ftparchive/makefile21
2 files changed, 10 insertions, 21 deletions
diff --git a/ftparchive/CMakeLists.txt b/ftparchive/CMakeLists.txt
new file mode 100644
index 000000000..1e1dc36ca
--- /dev/null
+++ b/ftparchive/CMakeLists.txt
@@ -0,0 +1,10 @@
+# Create the executable tasks
+file(GLOB_RECURSE source "*.cc")
+add_executable(apt-ftparchive ${source})
+
+# Link the executables against the libraries
+target_include_directories(apt-ftparchive PRIVATE ${BERKELEY_DB_INCLUDE_DIRS})
+target_link_libraries(apt-ftparchive apt-inst apt-pkg apt-private ${BERKELEY_DB_LIBRARIES})
+
+# Install the executables
+install(TARGETS apt-ftparchive RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
diff --git a/ftparchive/makefile b/ftparchive/makefile
deleted file mode 100644
index c80487c3f..000000000
--- a/ftparchive/makefile
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- make -*-
-BASE=..
-SUBDIR=ftparchive
-
-# Bring in the default rules
-include ../buildlib/defaults.mak
-
-# The apt-ftparchive program
-ifdef BDBLIB
-APT_DOMAIN:=apt-utils
-PROGRAM=apt-ftparchive
-SLIBS = -lapt-pkg -lapt-inst -lapt-private $(BDBLIB) $(INTLLIBS)
-LIB_MAKES = apt-pkg/makefile apt-inst/makefile apt-private/makefile
-SOURCE = apt-ftparchive.cc cachedb.cc writer.cc contents.cc override.cc \
- multicompress.cc sources.cc byhash.cc
-include $(PROGRAM_H)
-else
-PROGRAM=apt-ftparchive
-MESSAGE="Must have libdb to build apt-ftparchive"
-include $(FAIL_H)
-endif # ifdef BDBLIB