CMakeLists.txt 734 B

123456789101112131415161718192021222324
  1. # Set the version of the library
  2. set(MAJOR 0.0)
  3. set(MINOR 0)
  4. # Definition of the C++ files used to build the library
  5. file(GLOB_RECURSE library "*.cc")
  6. file(GLOB_RECURSE headers "*.h")
  7. # Create a library using the C++ files
  8. add_library(apt-private SHARED ${library})
  9. # Link the library and set the SONAME
  10. target_link_libraries(apt-private PUBLIC apt-pkg)
  11. set_target_properties(apt-private PROPERTIES VERSION ${MAJOR}.${MINOR})
  12. set_target_properties(apt-private PROPERTIES SOVERSION ${MAJOR})
  13. add_version_script(apt-private)
  14. # Install the library and the headers
  15. install(TARGETS apt-private
  16. LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
  17. NAMELINK_SKIP)
  18. flatify(${PROJECT_BINARY_DIR}/include/apt-private/ "${headers}")