aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXimin Luo <ximin@dfinity.org>2018-12-06 05:23:56 +0800
committerMITSUNARI Shigeo <herumi@nifty.com>2018-12-06 14:21:16 +0800
commit41e90a996716a84bae971de6085431d596dcdeff (patch)
treee2d3f04f9041fcdf03d7e711860012902daba571
parent6cfb77a18f9c82959121380a86e392ed664a31b9 (diff)
downloaddexon-mcl-41e90a996716a84bae971de6085431d596dcdeff.tar.gz
dexon-mcl-41e90a996716a84bae971de6085431d596dcdeff.tar.zst
dexon-mcl-41e90a996716a84bae971de6085431d596dcdeff.zip
The dynamic library should be named the same as the static library
-rw-r--r--CMakeLists.txt9
-rw-r--r--readme.md2
2 files changed, 10 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7dc3278..7590664 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -12,6 +12,11 @@ option(
"download cybozulib_ext"
OFF
)
+option(
+ USE_OLD_SHARED_NAME
+ "add '_dy' of shared library name"
+ OFF
+)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
@@ -85,8 +90,10 @@ include_directories(
)
add_library(mcl STATIC ${SRCS})
-if(NOT MSVC)
add_library(mcl_dy SHARED ${SRCS})
+set_target_properties(mcl_dy PROPERTIES OUTPUT_NAME mcl)
+if(NOT USE_OLD_SHARED_NAME)
+ set_target_properties(mcl_dy PROPERTIES OUTPUT_NAME mcl)
endif()
file(GLOB MCL_HEADERS include/mcl/*.hpp include/mcl/bn.h include/mcl/curve_type.h)
diff --git a/readme.md b/readme.md
index e8ab862..9a14d38 100644
--- a/readme.md
+++ b/readme.md
@@ -10,6 +10,8 @@ mcl is a library for pairing-based cryptography.
The current version supports the optimal Ate pairing over BN curves and BLS12-381 curves.
# News
+* The default name of the shared library is renamed fromlibmcl_dy.a to libmcl.a.
+ * Use `cmake -DUSE_OLD_SHARED_NAME=ON` if you want to use the old name.
* 2nd argument of `mclBn_init` is changed from `maxUnitSize` to `compiledTimeVar`, which must be `MCLBN_COMPILED_TIME_VAR`.
* break backward compatibility of mapToGi for BLS12. A map-to-function for BN is used.
If `MCL_USE_OLD_MAPTO_FOR_BLS12` is defined, then the old function is used, but this will be removed in the future.