Browse Source

- fixed missed cpack definition for install

master
Andreas Romeyke 2 months ago
parent
commit
fc6fc7d7d3
2 changed files with 21 additions and 0 deletions
  1. +16
    -0
      CMakeLists.txt
  2. +5
    -0
      src/CMakeLists.txt

+ 16
- 0
CMakeLists.txt View File

@@ -9,6 +9,7 @@ add_subdirectory(src)
# TESTS
add_subdirectory(test)
enable_testing()

add_test(NAME TestPayload COMMAND TestPayload)
add_test(NAME TestPayloadManifest COMMAND TestPayloadManifest)
add_test(NAME TestTagManifest COMMAND TestTagManifest)
@@ -26,5 +27,20 @@ set (CPACK_GENERATOR="TGZ;DEB;RPM")
#set (CPACK_GENERATOR="DEB")
set (CPACK_PACKAGE_CONTACT "Andreas Romeyke libcbag@andreas-romeyke.de")
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)
set(CPACK_DEBIAN_PACKAGE_DEPENDS "libssl1.1 (>= 1.1.1), libcurl4 (>=7.64.0)")
# TODO: set(CPACK_PACKAGE_EXECUTABLES)
## INSTALL
# Binaries
install (TARGETS create_a_bag RUNTIME DESTINATION bin)
install (TARGETS validate_a_bag RUNTIME DESTINATION bin)

# Library
# Note: may not work on windows
install (TARGETS cbag
LIBRARY DESTINATION lib
ARCHIVE DESTINATION lib
PUBLIC_HEADER DESTINATION include
)


include(CPack)

+ 5
- 0
src/CMakeLists.txt View File

@@ -56,6 +56,8 @@ file( GLOB libcbag_SOURCES_LIB
"lib/*.cpp"
)

file( GLOB libcbag_HEADERS "include/*.hpp" )

find_package(CURL REQUIRED)
message("Curl include dir: ${CURL_INCLUDE_DIR}")
message("Curl libraries: ${CURL_LIBRARIES}")
@@ -68,6 +70,7 @@ link_directories(${CURL_LIBRARIES})

add_library(cbag ${libcbag_SOURCES_LIB} )
target_include_directories(cbag PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
set_target_properties(cbag PROPERTIES PUBLIC_HEADER ${libcbag_HEADERS})


#add_executable(test_payload ${PROJECT_SOURCE_DIR}/examples/test_payload.cpp ${libcbag_SOURCES_lib})
@@ -82,3 +85,5 @@ TARGET_LINK_LIBRARIES(validate_a_bag ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${C
add_executable(create_a_bag examples/create_a_bag.cpp ${libcbag_SOURCES_lib})
#TARGET_LINK_LIBRARIES(test_bag ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${POCO_NET_LIBRARIES} cbag)
TARGET_LINK_LIBRARIES(create_a_bag ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${CURL_LIBRARIES} cbag)



Loading…
Cancel
Save