File: CMakeLists.txt

package info (click to toggle)
apt 3.1.16
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 22,788 kB
  • sloc: cpp: 71,226; sh: 31,791; xml: 5,553; perl: 217; python: 197; ansic: 191; makefile: 41
file content (26 lines) | stat: -rw-r--r-- 962 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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}")