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
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
2.5 KiB

  1. find_package(Boost COMPONENTS filesystem unit_test_framework REQUIRED)
  2. message(status "** Boost Include: ${Boost_INCLUDE_DIR}")
  3. message(status "** Boost Libraries: ${Boost_LIBRARY_DIRS}")
  4. message(status "** Boost Libraries: ${Boost_LIBRARIES}")
  5. INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIR})
  6. set (libcbag_dir ${PROJECT_SOURCE_DIR})
  7. include_directories("${libcbag_dir}/src/include")
  8. message(status "** libcbag Include: ${libcbag_dir}")
  9. message(status "** libcbag Libraries: ${libcbag_BINARY_DIR}")
  10. LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
  11. find_package(OpenSSL REQUIRED)
  12. message("OpenSSL include dir: ${OPENSSL_INCLUDE_DIR}")
  13. message("OpenSSL libraries: ${OPENSSL_LIBRARIES}")
  14. include_directories(${OPENSSL_INCLUDE_DIR})
  15. link_directories(${OPENSSL_LIBRARIES})
  16. add_definitions(-DBOOST_TEST_DYN_LINK)
  17. #find_package(Poco COMPONENTS net)
  18. #message("POCO include dir: ${POCO_INCLUDE_DIR}")
  19. #message("POCO libraries: ${POCO_LIBRARIES}")
  20. #include_directories(${POCO_INCLUDE_DIR})
  21. #link_directories(${POCO_LIBRARIES})
  22. #find_library(POCO PocoNet)
  23. #find_path(POCO_NET_INCLUDE_DIR "Poco/URI.h")
  24. #set(POCO_NET_INCLUDE_DIR "/usr/include")
  25. #set(POCO_NET_LIBRARIES "libPocoNet.so")
  26. #find_path(POCO_NET_LIBRARY "libPocoNet.so")
  27. #message("POCO found: ${POCO_FOUND}")
  28. #message("POCO include dir: ${POCO_INCLUDE_DIR}")
  29. #message("POCO library: ${POCO_LIBRARY}")
  30. #message("POCO libraries: ${POCO_LIBRARIES}")
  31. find_package(CURL REQUIRED)
  32. message("Curl include dir: ${CURL_INCLUDE_DIR}")
  33. message("Curl libraries: ${CURL_LIBRARIES}")
  34. include_directories(${CURL_INCLUDE_DIR})
  35. link_directories(${CURL_LIBRARIES})
  36. add_executable(TestBag testbag.cpp)
  37. add_executable(TestPayload test_payload.cpp)
  38. add_executable(TestPayloadManifest test_payloadmanifest.cpp)
  39. add_executable(TestTagManifest test_tagmanifest.cpp)
  40. add_executable(TestBagMetadata test_bagmetadata.cpp)
  41. add_executable(TestFetchFile test_fetchfile.cpp)
  42. target_link_libraries(TestBag ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${CURL_LIBRARY} cbag)
  43. target_link_libraries(TestPayload ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} cbag)
  44. target_link_libraries(TestPayloadManifest ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} cbag)
  45. target_link_libraries(TestTagManifest ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} cbag)
  46. target_link_libraries(TestBagMetadata ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} cbag)
  47. #target_link_libraries(TestFetchFile ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${POCO_NET_LIBRARY} cbag)
  48. target_link_libraries(TestFetchFile ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${CURL_LIBRARY} cbag)