C++ Library to handle BagIt structures. BagIt is a standard format to create transfer packages for digital preservation purposes. See https://en.wikipedia.org/wiki/BagIt for details http://andreas-romeyke.de
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

47 wiersze
1.5 KiB

  1. cmake_minimum_required (VERSION 2.6)
  2. project (libcbag)
  3. # add default CFLAGS
  4. set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fstack-protector-strong -Wformat -Werror=format-security")
  5. set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,relro -fPIE")
  6. add_subdirectory(src)
  7. # TESTS
  8. add_subdirectory(test)
  9. enable_testing()
  10. add_test(NAME TestPayload COMMAND TestPayload)
  11. add_test(NAME TestPayloadManifest COMMAND TestPayloadManifest)
  12. add_test(NAME TestTagManifest COMMAND TestTagManifest)
  13. add_test(NAME TestBagMetadata COMMAND TestBagMetadata)
  14. add_test(NAME TestFetchFile COMMAND TestFetchFile)
  15. add_test(NAME TestBag COMMAND TestBag)
  16. # cpack definitions
  17. INCLUDE(InstallRequiredSystemLibraries)
  18. set (CPACK_PACKAGE_VENDOR "Andreas Romeyke")
  19. set (CPACK_VERSION_MAJOR "0")
  20. set (CPACK_RESOURCE_FILE_LICENSE "${PROJECT_SOURCE_DIR}/License")
  21. set (CPACK_RESOURCE_FILE_README "${PROJECT_SOURCE_DIR}/README")
  22. set (CPACK_PACKAGE_DESCRIPTION_FILE "${PROJECT_SOURCE_DIR}/README.md")
  23. set (CPACK_GENERATOR="TGZ;DEB;RPM")
  24. #set (CPACK_GENERATOR="DEB")
  25. set (CPACK_PACKAGE_CONTACT "Andreas Romeyke libcbag@andreas-romeyke.de")
  26. set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
  27. set(CPACK_DEBIAN_PACKAGE_DEPENDS "libssl1.1 (>= 1.1.1), libcurl4 (>=7.64.0)")
  28. # TODO: set(CPACK_PACKAGE_EXECUTABLES)
  29. ## INSTALL
  30. # Binaries
  31. install (TARGETS create_a_bag RUNTIME DESTINATION bin)
  32. install (TARGETS validate_a_bag RUNTIME DESTINATION bin)
  33. # Library
  34. # Note: may not work on windows
  35. install (TARGETS cbag
  36. LIBRARY DESTINATION lib
  37. ARCHIVE DESTINATION lib
  38. PUBLIC_HEADER DESTINATION include
  39. )
  40. include(CPack)