summaryrefslogtreecommitdiff
path: root/apt-private
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 /apt-private
parentb2cfacf1180e4b3fcbb2ae2ea52cf270ef74e971 (diff)
parent61fef4ddbec8f70bb9e213ac0491d4e6cfefab30 (diff)
Merge branch 'cmake'
Diffstat (limited to 'apt-private')
-rw-r--r--apt-private/CMakeLists.txt23
-rw-r--r--apt-private/makefile21
-rw-r--r--apt-private/private-cachefile.h2
-rw-r--r--apt-private/private-cacheset.h2
4 files changed, 23 insertions, 25 deletions
diff --git a/apt-private/CMakeLists.txt b/apt-private/CMakeLists.txt
new file mode 100644
index 000000000..6de9e0281
--- /dev/null
+++ b/apt-private/CMakeLists.txt
@@ -0,0 +1,23 @@
+# Set the version of the library
+set(MAJOR 0.0)
+set(MINOR 0)
+
+# Definition of the C++ files used to build the library
+file(GLOB_RECURSE library "*.cc")
+file(GLOB_RECURSE headers "*.h")
+
+# Create a library using the C++ files
+add_library(apt-private SHARED ${library})
+
+# Link the library and set the SONAME
+target_link_libraries(apt-private PUBLIC apt-pkg)
+set_target_properties(apt-private PROPERTIES VERSION ${MAJOR}.${MINOR})
+set_target_properties(apt-private PROPERTIES SOVERSION ${MAJOR})
+add_version_script(apt-private)
+
+# Install the library and the headers
+install(TARGETS apt-private
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
+ NAMELINK_SKIP)
+
+flatify(${PROJECT_BINARY_DIR}/include/apt-private/ "${headers}")
diff --git a/apt-private/makefile b/apt-private/makefile
deleted file mode 100644
index 1934db160..000000000
--- a/apt-private/makefile
+++ /dev/null
@@ -1,21 +0,0 @@
-# -*- make -*-
-BASE=..
-SUBDIR=apt-private
-
-# Header location
-HEADER_TARGETDIRS = apt-private
-
-# Bring in the default rules
-include ../buildlib/defaults.mak
-
-# The library name
-LIBRARY=apt-private
-MAJOR=0.0
-MINOR=0
-SLIBS=$(PTHREADLIB) -lapt-pkg
-CXXFLAGS += -fvisibility=hidden -fvisibility-inlines-hidden
-
-SOURCE = $(sort $(wildcard *.cc))
-HEADERS = $(addprefix apt-private/,$(sort $(wildcard *.h)))
-
-include $(LIBRARY_H)
diff --git a/apt-private/private-cachefile.h b/apt-private/private-cachefile.h
index 27642e025..77e8b61d9 100644
--- a/apt-private/private-cachefile.h
+++ b/apt-private/private-cachefile.h
@@ -9,8 +9,6 @@
#include <apt-pkg/sourcelist.h>
#include <apt-pkg/cacheset.h>
-#include <apti18n.h>
-
// class CacheFile - Cover class for some dependency cache functions /*{{{*/
class APT_PUBLIC CacheFile : public pkgCacheFile
{
diff --git a/apt-private/private-cacheset.h b/apt-private/private-cacheset.h
index 4a43155fe..37c921081 100644
--- a/apt-private/private-cacheset.h
+++ b/apt-private/private-cacheset.h
@@ -11,8 +11,6 @@
#include <set>
#include <string>
-#include <apti18n.h>
-
class OpProgress;
class VerIteratorWithCaching