Browse Source

- fixed prefix in library building

- prepared to build shared library sucessfully if
  cmake is called with option "-DBUILD_SHARED_LIBS:BOOL=ON"
master
parent
commit
352e43ab9b
2 changed files with 9 additions and 9 deletions
  1. +4
    -4
      src/CMakeLists.txt
  2. +5
    -5
      test/CMakeLists.txt

+ 4
- 4
src/CMakeLists.txt View File

@ -31,13 +31,13 @@ file( GLOB libcbag_SOURCES_LIB
add_library(libcbag ${libcbag_SOURCES_LIB} )
target_include_directories(libcbag PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
add_library(cbag ${libcbag_SOURCES_LIB} )
target_include_directories(cbag PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
#add_executable(test_payload ${PROJECT_SOURCE_DIR}/examples/test_payload.cpp ${libcbag_SOURCES_lib})
add_executable(test_payload examples/test_payload.cpp ${libcbag_SOURCES_lib})
TARGET_LINK_LIBRARIES(test_payload ${Boost_LIBRARIES} libcbag)
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} libcbag)
TARGET_LINK_LIBRARIES(test_bag ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} cbag)

+ 5
- 5
test/CMakeLists.txt View File

@ -19,10 +19,10 @@ add_executable(TestPayload test_payload.cpp)
add_executable(TestPayloadManifest test_payloadmanifest.cpp)
add_executable(TestTagManifest test_tagmanifest.cpp)
add_executable(TestBagMetadata test_bagmetadata.cpp)
target_link_libraries(TestBag ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY})
target_link_libraries(TestPayload ${Boost_LIBRARIES} libcbag)
target_link_libraries(TestPayloadManifest ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} libcbag)
target_link_libraries(TestTagManifest ${Boost_LIBRARIES} ${OPENSSL_LIBRARIES} libcbag)
target_link_libraries(TestBagMetadata ${Boost_LIBRARIES} libcbag)
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)

Loading…
Cancel
Save