Commit 76719c8d authored by Ghislain MARY's avatar Ghislain MARY Committed by Sandrine Avakian

Fix linking of bctoolbox_tester executable.

parent 9b6a370b
......@@ -20,10 +20,10 @@
#
############################################################################
if(ENABLE_STATIC)
set(PROJECT_LIBS bctoolbox-static bctoolbox-tester-static)
else()
if(ENABLE_SHARED)
set(PROJECT_LIBS bctoolbox bctoolbox-tester)
else()
set(PROJECT_LIBS bctoolbox-static bctoolbox-tester-static)
endif()
if(CUNIT_FOUND)
......@@ -40,8 +40,13 @@ if(CUNIT_FOUND)
set_target_properties(bctoolbox_tester_exe PROPERTIES LINK_FLAGS "${LINK_FLAGS_STR}")
endif()
set_target_properties(bctoolbox_tester_exe PROPERTIES OUTPUT_NAME bctoolbox_tester)
target_include_directories(bctoolbox_tester_exe PUBLIC ${BCTOOLBOX_TESTER_INCLUDE_DIRS})
target_link_libraries(bctoolbox_tester_exe ${BCTOOLBOX_TESTER_LIBRARIES} ${PROJECT_LIBS})
target_link_libraries(bctoolbox_tester_exe PRIVATE ${PROJECT_LIBS})
if(MBEDTLS_FOUND)
target_link_libraries(bctoolbox_tester_exe PRIVATE ${MBEDTLS_LIBRARIES})
endif()
if(POLARSSL_FOUND)
target_link_libraries(bctoolbox_tester_exe PRIVATE ${POLARSSL_LIBRARIES})
endif()
set_target_properties(bctoolbox_tester_exe PROPERTIES XCODE_ATTRIBUTE_WARNING_CFLAGS "")
add_test(NAME bctoolbox_tester COMMAND bctoolbox_tester --verbose)
endif()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment