From 32d40ef1909833443b94fc62d650c7ad0a58149a Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Sun, 27 Oct 2013 19:02:55 +0100 Subject: Build a shared library as well --- src/CMakeLists.txt | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 318d4f8..d12e1f8 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,7 +1,22 @@ include_directories(${LIBUECC_SOURCE_DIR}/include) -add_library(uecc STATIC ec25519.c ec25519_gf.c) +set(UECC_SRC ec25519.c ec25519_gf.c) +set(UECC_ABI 0) -install(TARGETS uecc +add_library(uecc_shared SHARED ${UECC_SRC}) +set_target_properties(uecc_shared PROPERTIES + OUTPUT_NAME uecc + SOVERSION ${UECC_ABI} + VERSION ${UECC_ABI}.${PROJECT_VERSION} +) + +add_library(uecc_static STATIC ${UECC_SRC}) +set_target_properties(uecc_static PROPERTIES + OUTPUT_NAME uecc +) + +install(TARGETS uecc_shared uecc_static ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib + RUNTIME DESTINATION bin ) -- cgit v1.2.3