X-Git-Url: http://wagner.pp.ru/gitweb/?a=blobdiff_plain;f=CMakeLists.txt;h=a85c86eeba55e74e3da7449bd71197a90f1c7653;hb=5d72a935d862cd2f6ea4b00f19a6edb5e0b0d92c;hp=198d746d32821a12eddaa3869bf1dc9392ec226d;hpb=b629c446ff7246e526999bfdd2657e774faf306f;p=openssl-gost%2Fengine.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 198d746..a85c86e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -44,6 +44,9 @@ endif() set(BIN_DIRECTORY bin) +# Same soversion as OpenSSL +set(GOST_SOVERSION "${OPENSSL_VERSION_MAJOR}.${OPENSSL_VERSION_MINOR}") + set(OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/${BIN_DIRECTORY}) #set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${OUTPUT_DIRECTORY}) @@ -135,6 +138,11 @@ set(GOST_ENGINE_SOURCE_FILES gost_omac_acpkm.c ) +add_executable(test_digest test_digest.c) +target_link_libraries(test_digest gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY}) +add_test(NAME digest + COMMAND test_digest) + add_executable(test_curves test_curves.c) target_link_libraries(test_curves gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY}) add_test(NAME curves @@ -150,6 +158,11 @@ target_link_libraries(test_sign gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY}) add_test(NAME sign/verify COMMAND test_sign) +add_executable(test_tls test_tls.c) +target_link_libraries(test_tls gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY} ${OPENSSL_SSL_LIBRARY}) +add_test(NAME TLS + COMMAND test_tls) + add_executable(test_context test_context.c) target_link_libraries(test_context gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY}) add_test(NAME context @@ -182,11 +195,26 @@ endif() add_executable(sign benchmark/sign.c) target_link_libraries(sign gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY} ${CLOCK_GETTIME_LIB}) +# All that may need to load just built engine will have path to it defined. +set(BINARY_TESTS_TARGETS + test_digest + test_curves + test_params + test_sign + test_context + test_grasshopper + test_keyexpimp + test_gost89 + test_tls + ) +set_property(TARGET ${BINARY_TESTS_TARGETS} APPEND PROPERTY COMPILE_DEFINITIONS ENGINE_DIR="${OUTPUT_DIRECTORY}") + add_library(gost_core STATIC ${GOST_LIB_SOURCE_FILES}) set_target_properties(gost_core PROPERTIES POSITION_INDEPENDENT_CODE ON) -add_library(gost_engine MODULE ${GOST_ENGINE_SOURCE_FILES}) +add_library(gost_engine SHARED ${GOST_ENGINE_SOURCE_FILES}) set_target_properties(gost_engine PROPERTIES PREFIX "" OUTPUT_NAME "gost") +set_target_properties(gost_engine PROPERTIES VERSION ${GOST_SOVERSION} SOVERSION ${GOST_SOVERSION}) target_link_libraries(gost_engine gost_core ${OPENSSL_CRYPTO_LIBRARY}) set(GOST_SUM_SOURCE_FILES