aboutsummaryrefslogtreecommitdiffstats
path: root/vendor/github.com/dexon-foundation/mcl/CMakeLists.txt
diff options
context:
space:
mode:
authorWei-Ning Huang <w@dexon.org>2019-04-11 18:32:33 +0800
committerGitHub <noreply@github.com>2019-04-11 18:32:33 +0800
commitb7ca8e6c9bafda89c91aa3d35a8feb3f9f6bab25 (patch)
tree59d29630eba2f02e452960a70b7bea7e6d32e592 /vendor/github.com/dexon-foundation/mcl/CMakeLists.txt
parent2922460b04b4378ce202e5fdb92ff6ad9607ab89 (diff)
downloaddexon-b7ca8e6c9bafda89c91aa3d35a8feb3f9f6bab25.tar.gz
dexon-b7ca8e6c9bafda89c91aa3d35a8feb3f9f6bab25.tar.zst
dexon-b7ca8e6c9bafda89c91aa3d35a8feb3f9f6bab25.zip
vendor: use BLS-12_384 curve and update dependencies (#356)
Diffstat (limited to 'vendor/github.com/dexon-foundation/mcl/CMakeLists.txt')
-rw-r--r--vendor/github.com/dexon-foundation/mcl/CMakeLists.txt16
1 files changed, 11 insertions, 5 deletions
diff --git a/vendor/github.com/dexon-foundation/mcl/CMakeLists.txt b/vendor/github.com/dexon-foundation/mcl/CMakeLists.txt
index 8ac418098..aaa0a8cf2 100644
--- a/vendor/github.com/dexon-foundation/mcl/CMakeLists.txt
+++ b/vendor/github.com/dexon-foundation/mcl/CMakeLists.txt
@@ -36,6 +36,10 @@ else()
add_definitions(-DMCL_USE_LLVM=1)
set(SRCS ${SRCS} src/asm/aarch64.s)
set(CPU arch64)
+ elseif(${CMAKE_SYSTEM_PROCESSOR} MATCHES "^arm")
+ add_definitions(-DMCL_USE_LLVM=1)
+ set(SRCS ${SRCS} src/asm/arm.s)
+ set(CPU arm)
elseif(APPLE)
add_definitions(-DMCL_USE_LLVM=1)
set(SRCS ${SRCS} src/asm/x86-64mac.s src/asm/x86-64mac.bmi2.s)
@@ -85,18 +89,20 @@ include_directories(
)
add_library(mcl STATIC ${SRCS})
-if(NOT MSVC)
add_library(mcl_dy SHARED ${SRCS})
-endif()
+target_link_libraries(mcl_dy ${LIBS})
+set_target_properties(mcl_dy PROPERTIES OUTPUT_NAME mcl)
+#set_target_properties(mcl_dy PROPERTIES OUTPUT_NAME mcl VERSION 1.0.0 SOVERSION 1)
+# For semantics of ABI compatibility including when you must bump SOVERSION, see:
+# https://community.kde.org/Policies/Binary_Compatibility_Issues_With_C%2B%2B#The_Do.27s_and_Don.27ts
-file(GLOB MCL_HEADERS include/mcl/*.hpp include/mcl/*.h)
+file(GLOB MCL_HEADERS include/mcl/*.hpp include/mcl/bn.h include/mcl/curve_type.h)
file(GLOB CYBOZULIB_HEADERS include/cybozu/*.hpp)
install(TARGETS mcl DESTINATION lib)
-if(NOT MSVC)
install(TARGETS mcl_dy DESTINATION lib)
-endif()
install(FILES ${MCL_HEADERS} DESTINATION include/mcl)
+install(FILES include/mcl/impl/bn_c_impl.hpp DESTINATION include/mcl/impl)
install(FILES ${CYBOZULIB_HEADERS} DESTINATION include/cybozu)
set(TEST_BASE fp_test ec_test fp_util_test window_method_test elgamal_test fp_tower_test gmp_test bn_test glv_test)