diff options
author | Paweł Bylica <chfast@gmail.com> | 2017-08-17 17:56:49 +0800 |
---|---|---|
committer | Paweł Bylica <chfast@gmail.com> | 2017-08-18 19:32:36 +0800 |
commit | 0712e6302e728bba281f41afa74e6c74638a75c7 (patch) | |
tree | 927bd11e92801eeee6111820c9ca9c3407ca19d4 | |
parent | 397a72107abbe691d9e04dcb6bcc0eb2b2a583fb (diff) | |
download | dexon-solidity-0712e6302e728bba281f41afa74e6c74638a75c7.tar dexon-solidity-0712e6302e728bba281f41afa74e6c74638a75c7.tar.gz dexon-solidity-0712e6302e728bba281f41afa74e6c74638a75c7.tar.bz2 dexon-solidity-0712e6302e728bba281f41afa74e6c74638a75c7.tar.lz dexon-solidity-0712e6302e728bba281f41afa74e6c74638a75c7.tar.xz dexon-solidity-0712e6302e728bba281f41afa74e6c74638a75c7.tar.zst dexon-solidity-0712e6302e728bba281f41afa74e6c74638a75c7.zip |
Boost: Use static libs
-rw-r--r-- | cmake/EthDependencies.cmake | 55 | ||||
-rw-r--r-- | libdevcore/CMakeLists.txt | 2 |
2 files changed, 3 insertions, 54 deletions
diff --git a/cmake/EthDependencies.cmake b/cmake/EthDependencies.cmake index 7d2a7675..14037307 100644 --- a/cmake/EthDependencies.cmake +++ b/cmake/EthDependencies.cmake @@ -43,60 +43,9 @@ find_program(CTEST_COMMAND ctest) ## use multithreaded boost libraries, with -mt suffix set(Boost_USE_MULTITHREADED ON) +set(Boost_USE_STATIC_LIBS ON) -if (CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") - -# use static boost libraries *.lib - set(Boost_USE_STATIC_LIBS ON) - -elseif (APPLE) - -# use static boost libraries *.a - set(Boost_USE_STATIC_LIBS ON) - -elseif (UNIX) -# use dynamic boost libraries *.dll - set(Boost_USE_STATIC_LIBS OFF) - -endif() - -set(STATIC_LINKING FALSE CACHE BOOL "Build static binaries") - -if (STATIC_LINKING) - - set(Boost_USE_STATIC_LIBS ON) - set(Boost_USE_STATIC_RUNTIME ON) - - set(OpenSSL_USE_STATIC_LIBS ON) - - if (MSVC) - # TODO - Why would we need .a on Windows? Maybe some Cygwin-ism. - # When I work through Windows static linkage, I will remove this, - # if that is possible. - set(CMAKE_FIND_LIBRARY_SUFFIXES .lib .a ${CMAKE_FIND_LIBRARY_SUFFIXES}) - elseif (APPLE) - # At the time of writing, we are still only PARTIALLY statically linked - # on OS X, with a mixture of statically linked external libraries where - # those are available, and dynamically linked where that is the only - # option we have. Ultimately, the aim would be for everything except - # the runtime libraries to be statically linked. - # - # Still TODO: - # - jsoncpp - # - json-rpc-cpp - # - leveldb (which pulls in snappy, for the dylib at ;east) - # - miniupnp - # - gmp - # - # Two further libraries (curl and zlib) ship as dylibs with the platform - # but again we could build from source and statically link these too. - set(CMAKE_FIND_LIBRARY_SUFFIXES .a .dylib) - else() - set(CMAKE_FIND_LIBRARY_SUFFIXES .a) - endif() -endif() - -find_package(Boost 1.54.0 QUIET REQUIRED COMPONENTS thread date_time system regex chrono filesystem unit_test_framework program_options random) +find_package(Boost 1.54.0 QUIET REQUIRED COMPONENTS regex filesystem unit_test_framework program_options) eth_show_dependency(Boost boost) diff --git a/libdevcore/CMakeLists.txt b/libdevcore/CMakeLists.txt index 7cda130a..4b15427f 100644 --- a/libdevcore/CMakeLists.txt +++ b/libdevcore/CMakeLists.txt @@ -2,7 +2,7 @@ file(GLOB sources "*.cpp") file(GLOB headers "*.h") add_library(devcore ${sources} ${headers}) -target_link_libraries(devcore PRIVATE ${Boost_FILESYSTEM_LIBRARIES} ${Boost_SYSTEM_LIBRARIES}) +target_link_libraries(devcore PRIVATE ${Boost_FILESYSTEM_LIBRARIES} ${Boost_REGEX_LIBRARIES} ${Boost_SYSTEM_LIBRARIES}) target_include_directories(devcore SYSTEM PUBLIC ${Boost_INCLUDE_DIRS}) target_include_directories(devcore PRIVATE ..) add_dependencies(devcore solidity_BuildInfo.h) |