Browse Source

- added CMAKE properties to find libpoco-net

master
Andreas Romeyke 1 year ago
parent
commit
123ee517ff
3 changed files with 18 additions and 2 deletions
  1. +1
    -0
      CMakeLists.txt
  2. +1
    -1
      src/CMakeLists.txt
  3. +16
    -1
      test/CMakeLists.txt

+ 1
- 0
CMakeLists.txt View File

@@ -8,4 +8,5 @@ add_test(NAME TestPayload COMMAND TestPayload)
add_test(NAME TestPayloadManifest COMMAND TestPayloadManifest)
add_test(NAME TestTagManifest COMMAND TestTagManifest)
add_test(NAME TestBagMetadata COMMAND TestBagMetadata)
add_test(NAME TestFetchFile COMMAND TestFetchFile)
add_test(NAME TestBag COMMAND TestBag)

+ 1
- 1
src/CMakeLists.txt View File

@@ -48,4 +48,4 @@ add_executable(test_payload examples/test_payload.cpp ${libcbag_SOURCES_lib})
TARGET_LINK_LIBRARIES(test_payload ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} cbag)
#add_executable(test_bag ${PROJECT_SOURCE_DIR}/examples/test_bag.cpp ${libcbag_SOURCES_lib})
add_executable(test_bag examples/test_bag.cpp ${libcbag_SOURCES_lib})
TARGET_LINK_LIBRARIES(test_bag ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} cbag)
TARGET_LINK_LIBRARIES(test_bag ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${POCO_NET_LIBRARIES} cbag)

+ 16
- 1
test/CMakeLists.txt View File

@@ -14,15 +14,30 @@ message("OpenSSL libraries: ${OPENSSL_LIBRARIES}")
include_directories(${OPENSSL_INCLUDE_DIR})
link_directories(${OPENSSL_LIBRARIES})
add_definitions(-DBOOST_TEST_DYN_LINK)

#find_package(Poco COMPONENTS net)
#message("POCO include dir: ${POCO_INCLUDE_DIR}")
#message("POCO libraries: ${POCO_LIBRARIES}")
#include_directories(${POCO_INCLUDE_DIR})
#link_directories(${POCO_LIBRARIES})
find_library(POCO_FOUNDATION PocoFoundation)
find_library(POCO_NET PocoNet)
set(POCO_NET_INCLUDE_DIR /usr/include)
set(POCO_NET_LIBRARIES ${POCO_NET_FILEPATH})
message("POCO include dir: ${POCO_NET_INCLUDE_DIR}")
message("POCO libraries: ${POCO_NET_LIBRARIES}")

add_executable(TestBag testbag.cpp)
add_executable(TestPayload test_payload.cpp)
add_executable(TestPayloadManifest test_payloadmanifest.cpp)
add_executable(TestTagManifest test_tagmanifest.cpp)
add_executable(TestBagMetadata test_bagmetadata.cpp)
add_executable(TestFetchFile test_fetchfile.cpp)
target_link_libraries(TestBag ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} cbag)
target_link_libraries(TestPayload ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} cbag)
target_link_libraries(TestPayloadManifest ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} cbag)
target_link_libraries(TestTagManifest ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} cbag)
target_link_libraries(TestBagMetadata ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} cbag)
target_link_libraries(TestBagMetadata ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} cbag)
target_link_libraries(TestFetchFile ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} ${POCO_NET_LIBRARIES} cbag)



Loading…
Cancel
Save