summaryrefslogtreecommitdiffstats
path: root/apt-private/CMakeLists.txt
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 06:14:41 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-27 06:14:41 +0000
commit549a391d6438e828001eeeaf235b080c054a7bf3 (patch)
tree1bb6b1ea5987fa167a1d13abe82209cc882dd94b /apt-private/CMakeLists.txt
parentInitial commit. (diff)
downloadapt-549a391d6438e828001eeeaf235b080c054a7bf3.tar.xz
apt-549a391d6438e828001eeeaf235b080c054a7bf3.zip
Adding upstream version 2.2.4.upstream/2.2.4upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'apt-private/CMakeLists.txt')
-rw-r--r--apt-private/CMakeLists.txt26
1 files changed, 26 insertions, 0 deletions
diff --git a/apt-private/CMakeLists.txt b/apt-private/CMakeLists.txt
new file mode 100644
index 0000000..88a8f97
--- /dev/null
+++ b/apt-private/CMakeLists.txt
@@ -0,0 +1,26 @@
+# Set the version of the library
+set(MAJOR 0.0)
+set(MINOR 0)
+
+# Definition of the C++ files used to build the library - note that this
+# is expanded at CMake time, so you have to rerun cmake if you add or remove
+# a file (you can just run cmake . in the build directory)
+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})
+set_target_properties(apt-private PROPERTIES CXX_VISIBILITY_PRESET hidden)
+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}")