]> git.saurik.com Git - apt.git/blob - apt-private/CMakeLists.txt
CMake: Add basic CMake build system
[apt.git] / apt-private / CMakeLists.txt
1 # Set the version of the library
2 set(MAJOR 0.0)
3 set(MINOR 0)
4
5 # Definition of the C++ files used to build the library
6 file(GLOB_RECURSE library "*.cc")
7 file(GLOB_RECURSE headers "*.h")
8
9 # Create a library using the C++ files
10 add_library(apt-private SHARED ${library})
11
12 # Link the library and set the SONAME
13 target_link_libraries(apt-private PUBLIC apt-pkg)
14 set_target_properties(apt-private PROPERTIES VERSION ${MAJOR}.${MINOR})
15 set_target_properties(apt-private PROPERTIES SOVERSION ${MAJOR})
16 add_version_script(apt-private)
17
18 # Install the library and the headers
19 install(TARGETS apt-private
20 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
21 NAMELINK_SKIP)
22
23 flatify(${PROJECT_BINARY_DIR}/include/apt-private/ "${headers}")