1 # Set the version of the library
5 # Definition of the C++ files used to build the library - note that this
6 # is expanded at CMake time, so you have to rerun cmake if you add or remove
7 # a file (you can just run cmake . in the build directory)
8 file(GLOB_RECURSE library "*.cc")
9 file(GLOB_RECURSE headers "*.h")
11 # Create a library using the C++ files
12 add_library(apt-private SHARED ${library})
14 # Link the library and set the SONAME
15 target_link_libraries(apt-private PUBLIC apt-pkg)
16 set_target_properties(apt-private PROPERTIES VERSION ${MAJOR}.${MINOR})
17 set_target_properties(apt-private PROPERTIES SOVERSION ${MAJOR})
18 add_version_script(apt-private)
20 # Install the library and the headers
21 install(TARGETS apt-private
22 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
25 flatify(${PROJECT_BINARY_DIR}/include/apt-private/ "${headers}")