diff --git a/CMakeLists.txt b/CMakeLists.txt index 0465026..42893e8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,8 +37,6 @@ find_library( GMP_LIBRARY NAMES "gmp" PATHS "${DEPS_INSTALL_ROOT}/lib" ) find_library( GMPXX_LIBRARY NAMES "gmpxx" PATHS "${DEPS_INSTALL_ROOT}/lib" ) find_library( CRYPTOPP_LIBRARY NAMES "crypto" PATHS "${DEPS_INSTALL_ROOT}/lib" ) -set( HUNTER_ENABLED OFF ) - option(BUILD_TESTS "Build tests" ON) option(BUILD_WITH_FPIC "Build with -fPIC" OFF) option(BUILD_UTILS "Build utils" ON) @@ -158,12 +156,6 @@ add_library(bls ${sourses_bls} ${headers_bls}) include_directories(${Boost_INCLUDE_DIRS}) -if( SKALE_HAVE_BOOST_FROM_HUNTER ) - set( BOOST_LIBS_4_BLS Boost::program_options ) -else() - set( BOOST_LIBS_4_BLS boost_program_options ) -endif() - set (WITH_PROCPS OFF) set(BLS_INCLUDE_DIRS @@ -188,7 +180,7 @@ if (BUILD_UTILS) set_target_properties(dkg_keygen PROPERTIES LINK_FLAGS "-s DISABLE_EXCEPTION_CATCHING=1") endif() - target_link_libraries(dkg_keygen PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} ${BOOST_LIBS_4_BLS}) + target_link_libraries(dkg_keygen PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} boost_program_options) add_executable(dkg_glue tools/dkg_glue.cpp) target_include_directories(dkg_glue PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) @@ -196,7 +188,7 @@ if (BUILD_UTILS) target_compile_options(dkg_glue PRIVATE -s DISABLE_EXCEPTION_CATCHING=1) set_target_properties(dkg_glue PROPERTIES LINK_FLAGS "-s DISABLE_EXCEPTION_CATCHING=1") endif() - target_link_libraries(dkg_glue PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} ${BOOST_LIBS_4_BLS}) + target_link_libraries(dkg_glue PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} boost_program_options) add_executable(sign_bls tools/sign_bls.cpp) target_include_directories(sign_bls PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) @@ -204,7 +196,7 @@ if (BUILD_UTILS) target_compile_options(sign_bls PRIVATE -s DISABLE_EXCEPTION_CATCHING=1) set_target_properties(sign_bls PROPERTIES LINK_FLAGS "-s DISABLE_EXCEPTION_CATCHING=1") endif() - target_link_libraries(sign_bls PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} ${BOOST_LIBS_4_BLS}) + target_link_libraries(sign_bls PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} boost_program_options) add_executable(hash_g1 tools/hash_g1.cpp) target_include_directories(hash_g1 PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) @@ -212,7 +204,7 @@ if (BUILD_UTILS) target_compile_options(hash_g1 PRIVATE -s DISABLE_EXCEPTION_CATCHING=1) set_target_properties(hash_g1 PROPERTIES LINK_FLAGS "-s DISABLE_EXCEPTION_CATCHING=1") endif() - target_link_libraries(hash_g1 PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} ${BOOST_LIBS_4_BLS}) + target_link_libraries(hash_g1 PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} boost_program_options) add_executable(bls_glue tools/bls_glue.cpp) target_include_directories(bls_glue PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) @@ -220,7 +212,7 @@ if (BUILD_UTILS) target_compile_options(bls_glue PRIVATE -s DISABLE_EXCEPTION_CATCHING=1) set_target_properties(bls_glue PROPERTIES LINK_FLAGS "-s DISABLE_EXCEPTION_CATCHING=1") endif() - target_link_libraries(bls_glue PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} ${BOOST_LIBS_4_BLS}) + target_link_libraries(bls_glue PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} boost_program_options) add_executable(verify_bls tools/verify_bls.cpp) target_include_directories(verify_bls PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) @@ -228,7 +220,7 @@ if (BUILD_UTILS) target_compile_options(verify_bls PRIVATE -s DISABLE_EXCEPTION_CATCHING=1) set_target_properties(verify_bls PROPERTIES LINK_FLAGS "-s DISABLE_EXCEPTION_CATCHING=1") endif() - target_link_libraries(verify_bls PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} ${BOOST_LIBS_4_BLS}) + target_link_libraries(verify_bls PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} boost_program_options) add_executable(generate_key_system tools/generate_key_system.cpp) target_include_directories(generate_key_system PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) @@ -236,7 +228,7 @@ if (BUILD_UTILS) target_compile_options(generate_key_system PRIVATE -s DISABLE_EXCEPTION_CATCHING=1) set_target_properties(generate_key_system PROPERTIES LINK_FLAGS "-s DISABLE_EXCEPTION_CATCHING=1") endif() - target_link_libraries(generate_key_system PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} ${BOOST_LIBS_4_BLS}) + target_link_libraries(generate_key_system PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} boost_program_options) endif() if(BUILD_TESTS) @@ -246,7 +238,7 @@ if(BUILD_TESTS) target_compile_options(bls_unit_test PRIVATE -s DISABLE_EXCEPTION_CATCHING=1) set_target_properties(bls_unit_test PROPERTIES LINK_FLAGS "-s DISABLE_EXCEPTION_CATCHING=1") endif() - target_link_libraries(bls_unit_test PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} ${BOOST_LIBS_4_BLS}) + target_link_libraries(bls_unit_test PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} boost_program_options) add_test(NAME bls_tests COMMAND bls_unit_test) @@ -256,7 +248,7 @@ if(BUILD_TESTS) target_compile_options(dkg_unit_test PRIVATE -s DISABLE_EXCEPTION_CATCHING=1) set_target_properties(dkg_unit_test PROPERTIES LINK_FLAGS "-s DISABLE_EXCEPTION_CATCHING=1") endif() - target_link_libraries(dkg_unit_test PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMP_LIBRARY} ${GMPXX_LIBRARY} ${BOOST_LIBS_4_BLS}) + target_link_libraries(dkg_unit_test PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMP_LIBRARY} ${GMPXX_LIBRARY} boost_program_options) add_test(NAME dkg_tests COMMAND dkg_unit_test) @@ -266,13 +258,13 @@ if(BUILD_TESTS) target_compile_options(bls_test PRIVATE -s DISABLE_EXCEPTION_CATCHING=1) set_target_properties(bls_test PROPERTIES LINK_FLAGS "-s DISABLE_EXCEPTION_CATCHING=1") endif() - target_link_libraries(bls_test PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMP_LIBRARY} ${GMPXX_LIBRARY} ${BOOST_LIBS_4_BLS}) + target_link_libraries(bls_test PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMP_LIBRARY} ${GMPXX_LIBRARY} boost_program_options) add_test(NAME bls_test COMMAND bls_test) add_executable(dkg_attack test/dkg_attack.cpp) target_include_directories(dkg_attack PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}) - target_link_libraries(dkg_attack PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMP_LIBRARY} ${GMPXX_LIBRARY} ${BOOST_LIBS_4_BLS}) + target_link_libraries(dkg_attack PRIVATE bls ${CRYPTOPP_LIBRARY} ff ${GMP_LIBRARY} ${GMPXX_LIBRARY} boost_program_options) add_test(NAME dkg_attack COMMAND dkg_attack) @@ -282,7 +274,7 @@ if(BUILD_TESTS) target_compile_options(utils_unit_test PRIVATE -s DISABLE_EXCEPTION_CATCHING=1) set_target_properties(utils_unit_test PROPERTIES LINK_FLAGS "-s DISABLE_EXCEPTION_CATCHING=1") endif() - target_link_libraries(utils_unit_test PRIVATE bls te ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} ${BOOST_LIBS_4_BLS}) + target_link_libraries(utils_unit_test PRIVATE bls te ${CRYPTOPP_LIBRARY} ff ${GMPXX_LIBRARY} ${GMP_LIBRARY} boost_program_options) add_test(NAME utils_tests COMMAND utils_unit_test) diff --git a/deps/build.sh b/deps/build.sh index e6e5a9e..152b015 100755 --- a/deps/build.sh +++ b/deps/build.sh @@ -203,23 +203,23 @@ export CXXFLAGS="$CXXFLAGS -fPIC" WITH_OPENSSL="yes" WITH_BOOST="yes" -WITH_ZLIB="no" -WITH_ARGTABLE2="no" -WITH_JSONRPC="no" -WITH_JSONRPCCPP="no" -WITH_CURL="no" -WITH_MICRO_HTTP_D="no" -if [ "$SKALED_DEPS_CHAIN" = "1" ]; -then - WITH_BOOST="no" -else - WITH_ZLIB="yes" - WITH_ARGTABLE2="yes" - WITH_JSONRPC="yes" - WITH_JSONRPCCPP="yes" - WITH_CURL="yes" - WITH_MICRO_HTTP_D="yes" -fi +WITH_ZLIB="yes" +WITH_ARGTABLE2="yes" +WITH_JSONRPC="yes" +WITH_JSONRPCCPP="yes" +WITH_CURL="yes" +WITH_MICRO_HTTP_D="yes" +#if [ "$SKALED_DEPS_CHAIN" = "1" ]; +#then +# WITH_BOOST="no" +#else +# WITH_ZLIB="yes" +# WITH_ARGTABLE2="yes" +# WITH_JSONRPC="yes" +# WITH_JSONRPCCPP="yes" +# WITH_CURL="yes" +# WITH_MICRO_HTTP_D="yes" +#fi WITH_FF="yes" WITH_GMP="yes"