]> git.saurik.com Git - apt.git/blob - apt-private/CMakeLists.txt
CMake: Document that the globs are expanded during CMake
[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 - 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")
10
11 # Create a library using the C++ files
12 add_library(apt-private SHARED ${library})
13
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)
19
20 # Install the library and the headers
21 install(TARGETS apt-private
22 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
23 NAMELINK_SKIP)
24
25 flatify(${PROJECT_BINARY_DIR}/include/apt-private/ "${headers}")