summaryrefslogtreecommitdiff
path: root/apt-private
diff options
context:
space:
mode:
authorJulian Andres Klode <jak@debian.org>2016-08-06 21:03:43 +0200
committerJulian Andres Klode <jak@debian.org>2016-08-06 22:36:02 +0200
commitf3de2dbaf657f9040a4da448c57267de0fef7d33 (patch)
treed3b44456dd66f619f29671d56589f0257e986d7a /apt-private
parentcc1b834fe966d40206d148e1f27f0502463ac69f (diff)
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.
Diffstat (limited to 'apt-private')
-rw-r--r--apt-private/CMakeLists.txt23
1 files changed, 23 insertions, 0 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}")