summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMatthias Schiffer <mschiffer@universe-factory.net>2013-10-27 19:02:55 +0100
committerMatthias Schiffer <mschiffer@universe-factory.net>2013-10-27 19:04:13 +0100
commit32d40ef1909833443b94fc62d650c7ad0a58149a (patch)
tree4a26aa85d581d3a049e801814ca74e376821041a /src
parentc30aa7087c957584e996c9b9978b7e2d6bc36111 (diff)
downloadlibuecc-32d40ef1909833443b94fc62d650c7ad0a58149a.tar
libuecc-32d40ef1909833443b94fc62d650c7ad0a58149a.zip
Build a shared library as well
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt19
1 files changed, 17 insertions, 2 deletions
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
)