From b7ca8e6c9bafda89c91aa3d35a8feb3f9f6bab25 Mon Sep 17 00:00:00 2001 From: Wei-Ning Huang Date: Thu, 11 Apr 2019 18:32:33 +0800 Subject: vendor: use BLS-12_384 curve and update dependencies (#356) --- vendor/github.com/dexon-foundation/mcl/CMakeLists.txt | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'vendor/github.com/dexon-foundation/mcl/CMakeLists.txt') 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) -- cgit