]> git.saurik.com Git - apt.git/blob - apt-inst/CMakeLists.txt
fail on unsupported http/https proxy settings
[apt.git] / apt-inst / CMakeLists.txt
1 # Include apt-pkg directly, as some files have #include <system.h>
2 include_directories(${PROJECT_BINARY_DIR}/include/apt-pkg)
3
4 # Set the version of the library
5 set(MAJOR 2.0)
6 set(MINOR 0)
7 set(APT_INST_MAJOR ${MAJOR} PARENT_SCOPE)
8
9 # Definition of the C++ files used to build the library
10 file(GLOB_RECURSE library "*.cc")
11 file(GLOB_RECURSE headers "*.h")
12
13 # Create a library using the C++ files
14 add_library(apt-inst SHARED ${library})
15
16 # Link the library and set the SONAME
17 target_link_libraries(apt-inst PUBLIC apt-pkg ${CMAKE_THREAD_LIBS_INIT})
18 target_link_libraries(apt-inst PRIVATE ${CMAKE_THREAD_LIBS_INIT})
19 set_target_properties(apt-inst PROPERTIES VERSION ${MAJOR}.${MINOR})
20 set_target_properties(apt-inst PROPERTIES SOVERSION ${MAJOR})
21 add_version_script(apt-inst)
22
23 # Install the library and the headers
24 install(TARGETS apt-inst LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
25 install(FILES ${headers} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/apt-pkg)
26 flatify(${PROJECT_BINARY_DIR}/include/apt-pkg/ "${headers}")