diff --git a/CMakeLists.txt b/CMakeLists.txt index a4ed1c400..21c17e9ea 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -146,8 +146,8 @@ if (NOT LANGUAGES) # add_subdirectory(libethereumx) # TODO remove add_subdirectory(libwebthree) - add_subdirectory(test) - add_subdirectory(eth) + add_subdirectory(test) + add_subdirectory(eth) if("x${CMAKE_BUILD_TYPE}" STREQUAL "xDebug") add_subdirectory(exp) endif () @@ -170,8 +170,8 @@ if (NOT LANGUAGES) endif () add_subdirectory(libjsqrc) - add_subdirectory(libqethereum) - add_subdirectory(alethzero) + add_subdirectory(libqethereum) + add_subdirectory(alethzero) add_subdirectory(third) add_subdirectory(mix) diff --git a/cmake/FindGmp.cmake b/cmake/FindGmp.cmake index 4d7a3a04c..dc2bce813 100644 --- a/cmake/FindGmp.cmake +++ b/cmake/FindGmp.cmake @@ -18,14 +18,14 @@ find_path( find_library( GMP_LIBRARY - NAMES gmp - DOC "gmp library" + NAMES gmp + DOC "gmp library" ) # handle the QUIETLY and REQUIRED arguments and set GMP_FOUND to TRUE # if all listed variables are TRUE, hide their existence from configuration view include(FindPackageHandleStandardArgs) find_package_handle_standard_args(gmp DEFAULT_MSG - GMP_INCLUDE_DIR GMP_LIBRARY) + GMP_INCLUDE_DIR GMP_LIBRARY) mark_as_advanced (GMP_INCLUDE_DIR GMP_LIBRARY) diff --git a/cmake/FindJsonRpcCpp.cmake b/cmake/FindJsonRpcCpp.cmake index 00da29f75..221180337 100644 --- a/cmake/FindJsonRpcCpp.cmake +++ b/cmake/FindJsonRpcCpp.cmake @@ -11,34 +11,33 @@ # only look in default directories find_path( - JSON_RPC_CPP_INCLUDE_DIR - NAMES jsonrpccpp/server.h - PATH_SUFFIXES jsonrpc - DOC "json-rpc-cpp include dir" + JSON_RPC_CPP_INCLUDE_DIR + NAMES jsonrpccpp/server.h + PATH_SUFFIXES jsonrpc + DOC "json-rpc-cpp include dir" ) find_library( - JSON_RPC_CPP_COMMON_LIBRARY - NAMES jsonrpccpp-common - DOC "json-rpc-cpp common library" + JSON_RPC_CPP_COMMON_LIBRARY + NAMES jsonrpccpp-common + DOC "json-rpc-cpp common library" ) find_library( - JSON_RPC_CPP_SERVER_LIBRARY - NAMES jsonrpccpp-server - DOC "json-rpc-cpp server library" + JSON_RPC_CPP_SERVER_LIBRARY + NAMES jsonrpccpp-server + DOC "json-rpc-cpp server library" ) find_library( - JSON_RPC_CPP_CLIENT_LIBRARY - NAMES jsonrpccpp-client - DOC "json-rpc-cpp client library" + JSON_RPC_CPP_CLIENT_LIBRARY + NAMES jsonrpccpp-client + DOC "json-rpc-cpp client library" ) # message (" - json-rcp-cpp header : ${JSON_RPC_CPP_INCLUDE_DIRS}") # message (" - json-rcp-cpp lib : ${JSON_RPC_CPP_LIBRARIES}") - # handle the QUIETLY and REQUIRED arguments and set JSON_RPC_CPP_FOUND to TRUE # if all listed variables are TRUE, hide their existence from configuration view include(FindPackageHandleStandardArgs) diff --git a/cmake/FindLevelDB.cmake b/cmake/FindLevelDB.cmake index 26629d35f..3806be9ad 100644 --- a/cmake/FindLevelDB.cmake +++ b/cmake/FindLevelDB.cmake @@ -11,15 +11,15 @@ # only look in default directories find_path( - LEVELDB_INCLUDE_DIR - NAMES leveldb/db.h + LEVELDB_INCLUDE_DIR + NAMES leveldb/db.h DOC "leveldb include dir" ) find_library( - LEVELDB_LIBRARY - NAMES leveldb - DOC "leveldb library" + LEVELDB_LIBRARY + NAMES leveldb + DOC "leveldb library" ) # message (" - leveldb header : ${LEVELDB_INCLUDE_DIR}") @@ -30,6 +30,6 @@ find_library( # if all listed variables are TRUE, hide their existence from configuration view include(FindPackageHandleStandardArgs) find_package_handle_standard_args(leveldb DEFAULT_MSG - LEVELDB_INCLUDE_DIR LEVELDB_LIBRARY) + LEVELDB_INCLUDE_DIR LEVELDB_LIBRARY) mark_as_advanced (LEVELDB_INCLUDE_DIR LEVELDB_LIBRARY) diff --git a/cmake/FindMiniupnpc.cmake b/cmake/FindMiniupnpc.cmake index 90a202dce..55795d0f9 100644 --- a/cmake/FindMiniupnpc.cmake +++ b/cmake/FindMiniupnpc.cmake @@ -18,14 +18,14 @@ find_path( find_library( MINIUPNPC_LIBRARY - NAMES miniupnpc - DOC "miniupnpc library" + NAMES miniupnpc + DOC "miniupnpc library" ) # handle the QUIETLY and REQUIRED arguments and set MINIUPNPC_FOUND to TRUE # if all listed variables are TRUE, hide their existence from configuration view include(FindPackageHandleStandardArgs) find_package_handle_standard_args(miniupnpc DEFAULT_MSG - MINIUPNPC_INCLUDE_DIR MINIUPNPC_LIBRARY) + MINIUPNPC_INCLUDE_DIR MINIUPNPC_LIBRARY) mark_as_advanced (MINIUPNPC_INCLUDE_DIR MINIUPNPC_LIBRARY) diff --git a/cmake/FindReadline.cmake b/cmake/FindReadline.cmake index 16eb483ee..3db845bd0 100644 --- a/cmake/FindReadline.cmake +++ b/cmake/FindReadline.cmake @@ -18,14 +18,14 @@ find_path( find_library( READLINE_LIBRARY - NAMES readline - DOC "readline library" + NAMES readline + DOC "readline library" ) # handle the QUIETLY and REQUIRED arguments and set READLINE_FOUND to TRUE # if all listed variables are TRUE, hide their existence from configuration view include(FindPackageHandleStandardArgs) find_package_handle_standard_args(readline DEFAULT_MSG - READLINE_INCLUDE_DIR READLINE_LIBRARY) + READLINE_INCLUDE_DIR READLINE_LIBRARY) mark_as_advanced (READLINE_INCLUDE_DIR READLINE_LIBRARY) diff --git a/eth/CMakeLists.txt b/eth/CMakeLists.txt index fe5571f60..a7feb4927 100644 --- a/eth/CMakeLists.txt +++ b/eth/CMakeLists.txt @@ -17,16 +17,16 @@ add_dependencies(${EXECUTABLE} BuildInfo.h) target_link_libraries(${EXECUTABLE} ${Boost_REGEX_LIBRARY_RELEASE}) target_link_libraries(${EXECUTABLE} ${Boost_DATE_TIME_LIBRARY_RELEASE}) -if(MINIUPNPC_FOUND) +if (MINIUPNPC_FOUND) target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARY}) endif() -if(JSON_RPC_CPP_FOUND) - target_link_libraries(${EXECUTABLE} web3jsonrpc) +if (READLINE_FOUND) + target_link_libraries(${EXECUTABLE} ${READLINE_LIBRARY}) endif() -if (READLINE_FOUND) -target_link_libraries(${EXECUTABLE} ${READLINE_LIBRARY}) +if (JSONRPC) + target_link_libraries(${EXECUTABLE} web3jsonrpc) endif() target_link_libraries(${EXECUTABLE} webthree) diff --git a/exp/CMakeLists.txt b/exp/CMakeLists.txt index 1cd5218e2..47db2afe7 100644 --- a/exp/CMakeLists.txt +++ b/exp/CMakeLists.txt @@ -12,8 +12,8 @@ add_executable(${EXECUTABLE} ${SRC_LIST}) target_link_libraries(${EXECUTABLE} ${LEVELDB_LIBRARY}) -if(MINIUPNPC_FOUND) -target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARY}) +if (MINIUPNPC_FOUND) + target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARY}) endif() target_link_libraries(${EXECUTABLE} ethereum) diff --git a/extdep/compile/argtable2.cmake b/extdep/compile/argtable2.cmake index 88063a40f..778d6a299 100644 --- a/extdep/compile/argtable2.cmake +++ b/extdep/compile/argtable2.cmake @@ -1,13 +1,13 @@ -if(APPLE) +if (APPLE) -elseif(WIN32) +elseif (WIN32) ExternalProject_Add(argtable2 - GIT_REPOSITORY https://github.com/debris/argtable.git - GIT_TAG master - BINARY_DIR argtable2-prefix/src/argtable2 - CONFIGURE_COMMAND cmake . - BUILD_COMMAND devenv argtable2.sln /build release - INSTALL_COMMAND cmd /c cp src/Release/argtable2.lib ${ETH_DEPENDENCY_INSTALL_DIR}/lib && cp src/argtable2.h ${ETH_DEPENDENCY_INSTALL_DIR}/include + GIT_REPOSITORY https://github.com/debris/argtable.git + GIT_TAG master + BINARY_DIR argtable2-prefix/src/argtable2 + CONFIGURE_COMMAND cmake . + BUILD_COMMAND devenv argtable2.sln /build release + INSTALL_COMMAND cmd /c cp src/Release/argtable2.lib ${ETH_DEPENDENCY_INSTALL_DIR}/lib && cp src/argtable2.h ${ETH_DEPENDENCY_INSTALL_DIR}/include ) else() endif() diff --git a/extdep/compile/boost.cmake b/extdep/compile/boost.cmake index f38c70f02..7449cf47b 100644 --- a/extdep/compile/boost.cmake +++ b/extdep/compile/boost.cmake @@ -1,6 +1,6 @@ -if(APPLE) +if (APPLE) -elseif(WIN32) +elseif (WIN32) set(boost_address_model) # on windows 64: # set(boost_address_model address-model=64) diff --git a/extdep/compile/cryptopp.cmake b/extdep/compile/cryptopp.cmake index 9f54244bc..a7e65d6c6 100644 --- a/extdep/compile/cryptopp.cmake +++ b/extdep/compile/cryptopp.cmake @@ -1,33 +1,33 @@ # CryptoPP does not have good cross-platform support, there exist several different other projects to make it work ... # TODO the OS X build throws a lot of warnings, but compiles fine -if(APPLE) - ExternalProject_Add(cryptopp - URL https://downloads.sourceforge.net/project/cryptopp/cryptopp/5.6.2/cryptopp562.zip - BINARY_DIR cryptopp-prefix/src/cryptopp - CONFIGURE_COMMAND "" - BUILD_COMMAND make CXX=clang++ CXXFLAGS=-DCRYPTOPP_DISABLE_ASM - INSTALL_COMMAND make install PREFIX=${ETH_DEPENDENCY_INSTALL_DIR} - ) -elseif(WIN32) - file(MAKE_DIRECTORY ${ETH_DEPENDENCY_INSTALL_DIR}/include/cryptopp) +if (APPLE) + ExternalProject_Add(cryptopp + URL https://downloads.sourceforge.net/project/cryptopp/cryptopp/5.6.2/cryptopp562.zip + BINARY_DIR cryptopp-prefix/src/cryptopp + CONFIGURE_COMMAND "" + BUILD_COMMAND make CXX=clang++ CXXFLAGS=-DCRYPTOPP_DISABLE_ASM + INSTALL_COMMAND make install PREFIX=${ETH_DEPENDENCY_INSTALL_DIR} + ) +elseif (WIN32) + file(MAKE_DIRECTORY ${ETH_DEPENDENCY_INSTALL_DIR}/include/cryptopp) - ExternalProject_Add(cryptopp - SVN_REPOSITORY http://svn.code.sf.net/p/cryptopp/code/trunk/c5 - SVN_REVISION -r "541" - BINARY_DIR cryptopp-prefix/src/cryptopp - CONFIGURE_COMMAND devenv cryptest.sln /upgrade - BUILD_COMMAND devenv cryptest.sln /build release - INSTALL_COMMAND cmd /c cp Win32/DLL_Output/Release/cryptopp.dll ${ETH_DEPENDENCY_INSTALL_DIR}/lib && cp Win32/DLL_Output/Release/cryptopp.lib ${ETH_DEPENDENCY_INSTALL_DIR}/lib && cp *.h ${ETH_DEPENDENCY_INSTALL_DIR}/include/cryptopp - ) + ExternalProject_Add(cryptopp + SVN_REPOSITORY http://svn.code.sf.net/p/cryptopp/code/trunk/c5 + SVN_REVISION -r "541" + BINARY_DIR cryptopp-prefix/src/cryptopp + CONFIGURE_COMMAND devenv cryptest.sln /upgrade + BUILD_COMMAND devenv cryptest.sln /build release + INSTALL_COMMAND cmd /c cp Win32/DLL_Output/Release/cryptopp.dll ${ETH_DEPENDENCY_INSTALL_DIR}/lib && cp Win32/DLL_Output/Release/cryptopp.lib ${ETH_DEPENDENCY_INSTALL_DIR}/lib && cp *.h ${ETH_DEPENDENCY_INSTALL_DIR}/include/cryptopp + ) # on Linux, the default Makefile does not work. else() - ExternalProject_Add(cryptopp - URL https://github.com/mmoss/cryptopp/archive/v5.6.2.zip - BINARY_DIR cryptopp-prefix/src/cryptopp - CONFIGURE_COMMAND "" - BUILD_COMMAND scons --shared --prefix=${ETH_DEPENDENCY_INSTALL_DIR} - INSTALL_COMMAND "" - ) + ExternalProject_Add(cryptopp + URL https://github.com/mmoss/cryptopp/archive/v5.6.2.zip + BINARY_DIR cryptopp-prefix/src/cryptopp + CONFIGURE_COMMAND "" + BUILD_COMMAND scons --shared --prefix=${ETH_DEPENDENCY_INSTALL_DIR} + INSTALL_COMMAND "" + ) endif() - + diff --git a/extdep/compile/curl.cmake b/extdep/compile/curl.cmake index d4963c1d5..64f253d43 100644 --- a/extdep/compile/curl.cmake +++ b/extdep/compile/curl.cmake @@ -1,30 +1,29 @@ -if(APPLE) -ExternalProject_Add(curl - URL http://curl.haxx.se/download/curl-7.38.0.tar.bz2 - BINARY_DIR curl-prefix/src/curl - CONFIGURE_COMMAND ./configure --with-darwinssl --prefix=${ETH_DEPENDENCY_INSTALL_DIR} --exec-prefix=${ETH_DEPENDENCY_INSTALL_DIR} - BUILD_COMMAND make -j 3 - INSTALL_COMMAND make install +if (APPLE) + ExternalProject_Add(curl + URL http://curl.haxx.se/download/curl-7.38.0.tar.bz2 + BINARY_DIR curl-prefix/src/curl + CONFIGURE_COMMAND ./configure --with-darwinssl --prefix=${ETH_DEPENDENCY_INSTALL_DIR} --exec-prefix=${ETH_DEPENDENCY_INSTALL_DIR} + BUILD_COMMAND make -j 3 + INSTALL_COMMAND make install ) -elseif(WIN32) -ExternalProject_Add(curl - GIT_REPOSITORY https://github.com/debris/libcurl-7.29 - GIT_TAG master - BINARY_DIR curl-prefix/src/curl - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND cmd /c cp lib/release/libcurl.lib ${ETH_DEPENDENCY_INSTALL_DIR}/lib && cp -R include/curl ${ETH_DEPENDENCY_INSTALL_DIR}/include +elseif (WIN32) + ExternalProject_Add(curl + GIT_REPOSITORY https://github.com/debris/libcurl-7.29 + GIT_TAG master + BINARY_DIR curl-prefix/src/curl + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND cmd /c cp lib/release/libcurl.lib ${ETH_DEPENDENCY_INSTALL_DIR}/lib && cp -R include/curl ${ETH_DEPENDENCY_INSTALL_DIR}/include ) else() -ExternalProject_Add(curl - URL http://curl.haxx.se/download/curl-7.38.0.tar.bz2 - BINARY_DIR curl-prefix/src/curl - CONFIGURE_COMMAND CONFIG_CMD ./configure --prefix=${ETH_DEPENDENCY_INSTALL_DIR} --exec-prefix=${ETH_DEPENDENCY_INSTALL_DIR} - BUILD_COMMAND make -j 3 - INSTALL_COMMAND make install + ExternalProject_Add(curl + URL http://curl.haxx.se/download/curl-7.38.0.tar.bz2 + BINARY_DIR curl-prefix/src/curl + CONFIGURE_COMMAND CONFIG_CMD ./configure --prefix=${ETH_DEPENDENCY_INSTALL_DIR} --exec-prefix=${ETH_DEPENDENCY_INSTALL_DIR} + BUILD_COMMAND make -j 3 + INSTALL_COMMAND make install ) endif() - diff --git a/extdep/compile/icu.cmake b/extdep/compile/icu.cmake index c0c4d46fc..ba3f3a9f0 100644 --- a/extdep/compile/icu.cmake +++ b/extdep/compile/icu.cmake @@ -1,15 +1,13 @@ -if(APPLE) +if (APPLE) -# patch for VS2013 and Windows Qt build -elseif(WIN32) -ExternalProject_Add(icu - GIT_REPOSITORY https://github.com/debris/icu-win32.git - GIT_TAG master - BINARY_DIR icu-prefix/src/icu - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - #INSTALL_COMMAND cmd /c cp lib/* ${ETH_DEPENDENCY_INSTALL_DIR}/lib && cp -R include/uni ${ETH_DEPENDENCY_INSTALL_DIR}/include && cp bin/* ${ETH_DEPENDENCY_INSTALL_DIR}/bin - INSTALL_COMMAND cmake -E copy_directory . ${ETH_DEPENDENCY_INSTALL_DIR} +elseif (WIN32) + ExternalProject_Add(icu + GIT_REPOSITORY https://github.com/debris/icu-win32.git + GIT_TAG master + BINARY_DIR icu-prefix/src/icu + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND cmake -E copy_directory . ${ETH_DEPENDENCY_INSTALL_DIR} ) else() diff --git a/extdep/compile/jom.cmake b/extdep/compile/jom.cmake index 17ae6caab..f300fb2ad 100644 --- a/extdep/compile/jom.cmake +++ b/extdep/compile/jom.cmake @@ -1,18 +1,16 @@ -if(APPLE) +if (APPLE) -elseif(WIN32) -# nmake is not working for qt on windows, do not know why -ExternalProject_Add(jom - URL http://download.qt-project.org/official_releases/jom/jom.zip - BINARY_DIR jom-prefix/src/jom - CONFIGURE_COMMAND "" - BUILD_COMMAND "" -INSTALL_COMMAND cmake -E copy jom.exe ${ETH_DEPENDENCY_INSTALL_DIR}/bin +elseif (WIN32) + ExternalProject_Add(jom + URL http://download.qt-project.org/official_releases/jom/jom.zip + BINARY_DIR jom-prefix/src/jom + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND cmake -E copy jom.exe ${ETH_DEPENDENCY_INSTALL_DIR}/bin ) else() endif() - diff --git a/extdep/compile/json-rpc-cpp.cmake b/extdep/compile/json-rpc-cpp.cmake index cb2985e58..9d56b0dac 100644 --- a/extdep/compile/json-rpc-cpp.cmake +++ b/extdep/compile/json-rpc-cpp.cmake @@ -3,37 +3,37 @@ # DO NOT CHANGE ANYTHING HERE! if(APPLE) -ExternalProject_Add(json-rpc-cpp - # DEPENDS argtable2 jsoncpp - # DEPENDS curl # re-enable later, when we build curl again - GIT_REPOSITORY https://github.com/cinemast/libjson-rpc-cpp.git - GIT_TAG v0.3.2 - BINARY_DIR json-rpc-cpp-prefix/src/json-rpc-cpp - CONFIGURE_COMMAND cmake -DCMAKE_INSTALL_PREFIX=${ETH_DEPENDENCY_INSTALL_DIR} -DCMAKE_MODULE_PATH:PATH=${CMAKE_CURRENT_SOURCE_DIR}/cmake -DETH_DEPENDENCY_INSTALL_DIR:PATH=${ETH_DEPENDENCY_INSTALL_DIR} -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev . - BUILD_COMMAND make -j 3 - INSTALL_COMMAND make install && ${CMAKE_CURRENT_SOURCE_DIR}/scripts/json-rpc-cpp_osx.sh . ${ETH_DEPENDENCY_INSTALL_DIR} + ExternalProject_Add(json-rpc-cpp + # DEPENDS argtable2 jsoncpp + # DEPENDS curl # re-enable later, when we build curl again + GIT_REPOSITORY https://github.com/cinemast/libjson-rpc-cpp.git + GIT_TAG v0.3.2 + BINARY_DIR json-rpc-cpp-prefix/src/json-rpc-cpp + CONFIGURE_COMMAND cmake -DCMAKE_INSTALL_PREFIX=${ETH_DEPENDENCY_INSTALL_DIR} -DCMAKE_MODULE_PATH:PATH=${CMAKE_CURRENT_SOURCE_DIR}/cmake -DETH_DEPENDENCY_INSTALL_DIR:PATH=${ETH_DEPENDENCY_INSTALL_DIR} -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST -Wno-dev . + BUILD_COMMAND make -j 3 + INSTALL_COMMAND make install && ${CMAKE_CURRENT_SOURCE_DIR}/scripts/json-rpc-cpp_osx.sh . ${ETH_DEPENDENCY_INSTALL_DIR} ) -elseif(WIN32) -ExternalProject_Add(json-rpc-cpp - DEPENDS argtable2 jsoncpp curl - GIT_REPOSITORY https://github.com/debris/libjson-rpc-cpp.git - GIT_TAG windows - BINARY_DIR json-rpc-cpp-prefix/src/json-rpc-cpp - CONFIGURE_COMMAND cmake -DCMAKE_PREFIX_PATH=${ETH_DEPENDENCY_INSTALL_DIR} -DCURL_LIBRARIES=${ETH_DEPENDENCY_INSTALL_DIR}/lib/libcurl.lib . - BUILD_COMMAND devenv libjson-rpc-cpp.sln /build release - INSTALL_COMMAND cmd /c cp lib/Release/* ${ETH_DEPENDENCY_INSTALL_DIR}/lib && cp -R src/jsonrpccpp ${ETH_DEPENDENCY_INSTALL_DIR}/include +elseif (WIN32) + ExternalProject_Add(json-rpc-cpp + DEPENDS argtable2 jsoncpp curl + GIT_REPOSITORY https://github.com/debris/libjson-rpc-cpp.git + GIT_TAG windows + BINARY_DIR json-rpc-cpp-prefix/src/json-rpc-cpp + CONFIGURE_COMMAND cmake -DCMAKE_PREFIX_PATH=${ETH_DEPENDENCY_INSTALL_DIR} -DCURL_LIBRARIES=${ETH_DEPENDENCY_INSTALL_DIR}/lib/libcurl.lib . + BUILD_COMMAND devenv libjson-rpc-cpp.sln /build release + INSTALL_COMMAND cmd /c cp lib/Release/* ${ETH_DEPENDENCY_INSTALL_DIR}/lib && cp -R src/jsonrpccpp ${ETH_DEPENDENCY_INSTALL_DIR}/include ) else() -ExternalProject_Add(json-rpc-cpp - # DEPENDS argtable2 jsoncpp - # DEPENDS curl # re-enable later, when we build curl again - GIT_REPOSITORY https://github.com/cinemast/libjson-rpc-cpp.git - GIT_TAG v0.3.2 - BINARY_DIR json-rpc-cpp-prefix/src/json-rpc-cpp - CONFIGURE_COMMAND cmake -DCMAKE_INSTALL_PREFIX=${ETH_DEPENDENCY_INSTALL_DIR} -DCMAKE_MODULE_PATH:PATH=${CMAKE_CURRENT_SOURCE_DIR}/cmake -DETH_DEPENDENCY_INSTALL_DIR:PATH=${ETH_DEPENDENCY_INSTALL_DIR} -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST . - BUILD_COMMAND make -j 3 - INSTALL_COMMAND make install + ExternalProject_Add(json-rpc-cpp + # DEPENDS argtable2 jsoncpp + # DEPENDS curl # re-enable later, when we build curl again + GIT_REPOSITORY https://github.com/cinemast/libjson-rpc-cpp.git + GIT_TAG v0.3.2 + BINARY_DIR json-rpc-cpp-prefix/src/json-rpc-cpp + CONFIGURE_COMMAND cmake -DCMAKE_INSTALL_PREFIX=${ETH_DEPENDENCY_INSTALL_DIR} -DCMAKE_MODULE_PATH:PATH=${CMAKE_CURRENT_SOURCE_DIR}/cmake -DETH_DEPENDENCY_INSTALL_DIR:PATH=${ETH_DEPENDENCY_INSTALL_DIR} -DCMAKE_BUILD_TYPE=None -DCMAKE_FIND_FRAMEWORK=LAST . + BUILD_COMMAND make -j 3 + INSTALL_COMMAND make install ) endif() diff --git a/extdep/compile/jsoncpp.cmake b/extdep/compile/jsoncpp.cmake index b3bdef5e2..c0d6c97cd 100644 --- a/extdep/compile/jsoncpp.cmake +++ b/extdep/compile/jsoncpp.cmake @@ -1,15 +1,16 @@ -if(APPLE) +if (APPLE) -elseif(WIN32) +elseif (WIN32) + + file(MAKE_DIRECTORY ${ETH_DEPENDENCY_INSTALL_DIR}/include/jsoncpp) + ExternalProject_Add(jsoncpp + GIT_REPOSITORY https://github.com/open-source-parsers/jsoncpp + GIT_TAG svn-import + BINARY_DIR jsoncpp-prefix/src/jsoncpp + CONFIGURE_COMMAND cmake . + BUILD_COMMAND devenv jsoncpp.sln /build release + INSTALL_COMMAND cmd /c cp lib/Release/jsoncpp.lib ${ETH_DEPENDENCY_INSTALL_DIR}/lib && cp -R include/json ${ETH_DEPENDENCY_INSTALL_DIR}/include/jsoncpp + ) -file(MAKE_DIRECTORY ${ETH_DEPENDENCY_INSTALL_DIR}/include/jsoncpp) -ExternalProject_Add(jsoncpp - GIT_REPOSITORY https://github.com/open-source-parsers/jsoncpp - GIT_TAG svn-import - BINARY_DIR jsoncpp-prefix/src/jsoncpp - CONFIGURE_COMMAND cmake . - BUILD_COMMAND devenv jsoncpp.sln /build release - INSTALL_COMMAND cmd /c cp lib/Release/jsoncpp.lib ${ETH_DEPENDENCY_INSTALL_DIR}/lib && cp -R include/json ${ETH_DEPENDENCY_INSTALL_DIR}/include/jsoncpp -) else() endif() diff --git a/extdep/compile/leveldb.cmake b/extdep/compile/leveldb.cmake index 9774c8c57..2f5388c14 100644 --- a/extdep/compile/leveldb.cmake +++ b/extdep/compile/leveldb.cmake @@ -1,21 +1,21 @@ if (APPLE) -ExternalProject_Add(leveldb - #DEPENDS snappy - URL https://leveldb.googlecode.com/files/leveldb-1.15.0.tar.gz - BINARY_DIR leveldb-prefix/src/leveldb - #CONFIGURE_COMMAND patch < ${CMAKE_CURRENT_SOURCE_DIR}/compile/leveldb_osx.patch - CONFIGURE_COMMAND "" - BUILD_COMMAND export ETH_DEPENDENCY_INSTALL_DIR=${ETH_DEPENDENCY_INSTALL_DIR} && make -j 3 - INSTALL_COMMAND cp -rf include/leveldb ${ETH_DEPENDENCY_INSTALL_DIR}/include/ && cp libleveldb.a ${ETH_DEPENDENCY_INSTALL_DIR}/lib && cp libleveldb.dylib.1.15 ${ETH_DEPENDENCY_INSTALL_DIR}/lib/libleveldb.dylib + ExternalProject_Add(leveldb + #DEPENDS snappy + URL https://leveldb.googlecode.com/files/leveldb-1.15.0.tar.gz + BINARY_DIR leveldb-prefix/src/leveldb + #CONFIGURE_COMMAND patch < ${CMAKE_CURRENT_SOURCE_DIR}/compile/leveldb_osx.patch + CONFIGURE_COMMAND "" + BUILD_COMMAND export ETH_DEPENDENCY_INSTALL_DIR=${ETH_DEPENDENCY_INSTALL_DIR} && make -j 3 + INSTALL_COMMAND cp -rf include/leveldb ${ETH_DEPENDENCY_INSTALL_DIR}/include/ && cp libleveldb.a ${ETH_DEPENDENCY_INSTALL_DIR}/lib && cp libleveldb.dylib.1.15 ${ETH_DEPENDENCY_INSTALL_DIR}/lib/libleveldb.dylib ) -elseif(WIN32) -ExternalProject_Add(leveldb - GIT_REPOSITORY https://github.com/debris/leveldb-win32.git - GIT_TAG master - BINARY_DIR leveldb-prefix/src/leveldb - CONFIGURE_COMMAND "" - BUILD_COMMAND "" - INSTALL_COMMAND cmd /c cp lib/LibLevelDB.lib ${ETH_DEPENDENCY_INSTALL_DIR}/lib/leveldb.lib && cp -R include/leveldb ${ETH_DEPENDENCY_INSTALL_DIR}/include +elseif (WIN32) + ExternalProject_Add(leveldb + GIT_REPOSITORY https://github.com/debris/leveldb-win32.git + GIT_TAG master + BINARY_DIR leveldb-prefix/src/leveldb + CONFIGURE_COMMAND "" + BUILD_COMMAND "" + INSTALL_COMMAND cmd /c cp lib/LibLevelDB.lib ${ETH_DEPENDENCY_INSTALL_DIR}/lib/leveldb.lib && cp -R include/leveldb ${ETH_DEPENDENCY_INSTALL_DIR}/include ) else() diff --git a/extdep/compile/qt.cmake b/extdep/compile/qt.cmake index 049b3ba94..5fb8a1440 100644 --- a/extdep/compile/qt.cmake +++ b/extdep/compile/qt.cmake @@ -1,28 +1,28 @@ -if(APPLE) -ExternalProject_add(qt - URL http://qtmirror.ics.com/pub/qtproject/official_releases/qt/5.3/5.3.2/single/qt-everywhere-opensource-src-5.3.2.tar.gz - BINARY_DIR qt-prefix/src/qt - PATCH_COMMAND patch -d qtmultimedia/src/plugins/avfoundation/mediaplayer < ${CMAKE_CURRENT_SOURCE_DIR}/compile/qt_osx.patch - CONFIGURE_COMMAND ./configure -prefix ${ETH_DEPENDENCY_INSTALL_DIR} -system-zlib -qt-libpng -qt-libjpeg -confirm-license -opensource -nomake tests -release -nomake examples -no-xcb -arch x86_64 - BUILD_COMMAND make - INSTALL_COMMAND make install +if (APPLE) + ExternalProject_add(qt + URL http://qtmirror.ics.com/pub/qtproject/official_releases/qt/5.3/5.3.2/single/qt-everywhere-opensource-src-5.3.2.tar.gz + BINARY_DIR qt-prefix/src/qt + PATCH_COMMAND patch -d qtmultimedia/src/plugins/avfoundation/mediaplayer < ${CMAKE_CURRENT_SOURCE_DIR}/compile/qt_osx.patch + CONFIGURE_COMMAND ./configure -prefix ${ETH_DEPENDENCY_INSTALL_DIR} -system-zlib -qt-libpng -qt-libjpeg -confirm-license -opensource -nomake tests -release -nomake examples -no-xcb -arch x86_64 + BUILD_COMMAND make + INSTALL_COMMAND make install ) elseif(WIN32) -ExternalProject_Add(qt - DEPENDS icu jom - URL http://qtmirror.ics.com/pub/qtproject/official_releases/qt/5.3/5.3.2/single/qt-everywhere-opensource-src-5.3.2.tar.gz - BINARY_DIR qt-prefix/src/qt - UPDATE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/compile/qt_tools.bat - #PATCH_COMMAND cmake -E copy ${CMAKE_CURRENT_SOURCE_DIR}/compile/qt_configure.bat qtbase/configure.bat - CONFIGURE_COMMAND configure -prefix ${ETH_DEPENDENCY_INSTALL_DIR} -opensource -confirm-license -release -opengl desktop -platform win32-msvc2013 -icu -I ${ETH_DEPENDENCY_INSTALL_DIR}/include -L ${ETH_DEPENDENCY_INSTALL_DIR}/lib -nomake tests -nomake examples - BUILD_COMMAND nmake - INSTALL_COMMAND nmake install + ExternalProject_Add(qt + DEPENDS icu jom + URL http://qtmirror.ics.com/pub/qtproject/official_releases/qt/5.3/5.3.2/single/qt-everywhere-opensource-src-5.3.2.tar.gz + BINARY_DIR qt-prefix/src/qt + UPDATE_COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/compile/qt_tools.bat + #PATCH_COMMAND cmake -E copy ${CMAKE_CURRENT_SOURCE_DIR}/compile/qt_configure.bat qtbase/configure.bat + CONFIGURE_COMMAND configure -prefix ${ETH_DEPENDENCY_INSTALL_DIR} -opensource -confirm-license -release -opengl desktop -platform win32-msvc2013 -icu -I ${ETH_DEPENDENCY_INSTALL_DIR}/include -L ${ETH_DEPENDENCY_INSTALL_DIR}/lib -nomake tests -nomake examples + BUILD_COMMAND nmake + INSTALL_COMMAND nmake install ) -ExternalProject_Add_Step(qt configure_paths - COMMAND set PATH=${ETH_DEPENDENCY_INSTALL_DIR}/bin;%cd%/gnuwin32/bin;%cd%/qtbase/bin;%PATH% - DEPENDEES patch - DEPENDERS configure + ExternalProject_Add_Step(qt configure_paths + COMMAND set PATH=${ETH_DEPENDENCY_INSTALL_DIR}/bin;%cd%/gnuwin32/bin;%cd%/qtbase/bin;%PATH% + DEPENDEES patch + DEPENDERS configure ) else() diff --git a/extdep/compile/snappy.cmake b/extdep/compile/snappy.cmake index a15418304..0f7ba300e 100644 --- a/extdep/compile/snappy.cmake +++ b/extdep/compile/snappy.cmake @@ -1,10 +1,10 @@ -if(APPLE) -ExternalProject_Add(snappy - URL https://snappy.googlecode.com/files/snappy-1.1.1.tar.gz - BINARY_DIR snappy-prefix/src/snappy - CONFIGURE_COMMAND ./configure --disable-dependency-tracking --prefix=${ETH_DEPENDENCY_INSTALL_DIR} - BUILD_COMMAND "" - INSTALL_COMMAND make install +if (APPLE) + ExternalProject_Add(snappy + URL https://snappy.googlecode.com/files/snappy-1.1.1.tar.gz + BINARY_DIR snappy-prefix/src/snappy + CONFIGURE_COMMAND ./configure --disable-dependency-tracking --prefix=${ETH_DEPENDENCY_INSTALL_DIR} + BUILD_COMMAND "" + INSTALL_COMMAND make install ) elseif(WIN32) diff --git a/extdep/miniupnpc.cmake b/extdep/miniupnpc.cmake index b690ec2f2..4fbed6807 100644 --- a/extdep/miniupnpc.cmake +++ b/extdep/miniupnpc.cmake @@ -1,3 +1,4 @@ +# TODO this file is not used yet, but will be in future include(ExternalProject) ExternalProject_Add(miniupnpc @@ -6,6 +7,5 @@ ExternalProject_Add(miniupnpc CONFIGURE_COMMAND "" BUILD_COMMAND make -j 3 INSTALL_COMMAND make install INSTALLPREFIX=${ETH_DEPENDENCY_INSTALL_DIR} - ) - +) diff --git a/libethereum/CMakeLists.txt b/libethereum/CMakeLists.txt index 02cb8f96d..e1bad4426 100644 --- a/libethereum/CMakeLists.txt +++ b/libethereum/CMakeLists.txt @@ -28,7 +28,7 @@ target_link_libraries(${EXECUTABLE} ${LEVELDB_LIBRARY}) target_link_libraries(${EXECUTABLE} ${Boost_REGEX_LIBRARY_RELEASE}) if (MINIUPNPC_FOUND) -target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARY}) + target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARY}) endif() target_link_libraries(${EXECUTABLE} evm) diff --git a/libethereumx/CMakeLists.txt b/libethereumx/CMakeLists.txt index 1063f7981..4a3cdcda7 100644 --- a/libethereumx/CMakeLists.txt +++ b/libethereumx/CMakeLists.txt @@ -8,20 +8,19 @@ include_directories(..) set(EXECUTABLE ethereumx) -if(ETH_STATIC) - add_library(${EXECUTABLE} STATIC ${SRC_LIST}) -else() - add_library(${EXECUTABLE} SHARED ${SRC_LIST}) -endif() - file(GLOB HEADERS "*.h") +if (ETH_STATIC) + add_library(${EXECUTABLE} STATIC ${SRC_LIST} ${HEADERS}) +else() + add_library(${EXECUTABLE} SHARED ${SRC_LIST} ${HEADERS}) +endif() target_link_libraries(${EXECUTABLE} ${LEVELDB_LS}) target_link_libraries(${EXECUTABLE} ${CRYPTOPP_LS}) if (MINIUPNPC_LS) -target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LS}) + target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LS}) endif() target_link_libraries(${EXECUTABLE} ethereum) @@ -29,24 +28,6 @@ target_link_libraries(${EXECUTABLE} evm) target_link_libraries(${EXECUTABLE} lll) target_link_libraries(${EXECUTABLE} ethcore) target_link_libraries(${EXECUTABLE} secp256k1) -target_link_libraries(${EXECUTABLE} gmp) - -if (APPLE) - # Latest mavericks boost libraries only come with -mt - target_link_libraries(${EXECUTABLE} boost_system-mt) - target_link_libraries(${EXECUTABLE} boost_regex-mt) - target_link_libraries(${EXECUTABLE} boost_filesystem-mt) - target_link_libraries(${EXECUTABLE} boost_thread-mt) - find_package(Threads REQUIRED) - target_link_libraries(${EXECUTABLE} ${CMAKE_THREAD_LIBS_INIT}) -elseif (UNIX) - target_link_libraries(${EXECUTABLE} ${Boost_SYSTEM_LIBRARY}) - target_link_libraries(${EXECUTABLE} ${Boost_REGEX_LIBRARY}) - target_link_libraries(${EXECUTABLE} ${Boost_FILESYSTEM_LIBRARY}) - target_link_libraries(${EXECUTABLE} ${Boost_THREAD_LIBRARY}) - target_link_libraries(${EXECUTABLE} ${Boost_DATE_TIME_LIBRARY}) - target_link_libraries(${EXECUTABLE} ${CMAKE_THREAD_LIBS_INIT}) -endif () install( TARGETS ${EXECUTABLE} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib ) install( FILES ${HEADERS} DESTINATION include/${EXECUTABLE} ) diff --git a/libevm/CMakeLists.txt b/libevm/CMakeLists.txt index e62501f93..57004ebbb 100644 --- a/libevm/CMakeLists.txt +++ b/libevm/CMakeLists.txt @@ -17,7 +17,8 @@ include_directories(${LEVELDB_INCLUDE_DIR}) set(EXECUTABLE evm) file(GLOB HEADERS "*.h") -if(ETH_STATIC) + +if (ETH_STATIC) add_library(${EXECUTABLE} STATIC ${SRC_LIST} ${HEADERS}) else() add_library(${EXECUTABLE} SHARED ${SRC_LIST} ${HEADERS}) @@ -25,8 +26,8 @@ endif() target_link_libraries(${EXECUTABLE} ${LEVELDB_LIBRARY}) -if(MINIUPNPC_FOUND) -target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARY}) +if (MINIUPNPC_FOUND) + target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARY}) endif() target_link_libraries(${EXECUTABLE} ethcore) diff --git a/libevmcore/CMakeLists.txt b/libevmcore/CMakeLists.txt index 21dee65c2..9727ee1c9 100644 --- a/libevmcore/CMakeLists.txt +++ b/libevmcore/CMakeLists.txt @@ -17,7 +17,8 @@ include_directories(..) set(EXECUTABLE evmcore) file(GLOB HEADERS "*.h") -if(ETH_STATIC) + +if (ETH_STATIC) add_library(${EXECUTABLE} STATIC ${SRC_LIST} ${HEADERS}) else() add_library(${EXECUTABLE} SHARED ${SRC_LIST} ${HEADERS}) diff --git a/libjsqrc/CMakeLists.txt b/libjsqrc/CMakeLists.txt index 58dcb76ce..a6dbf023b 100644 --- a/libjsqrc/CMakeLists.txt +++ b/libjsqrc/CMakeLists.txt @@ -10,6 +10,6 @@ set(CMAKE_AUTOMOC OFF) qt5_add_resources(JSQRC js.qrc) add_library(jsqrc STATIC ${JSQRC}) -qt5_use_modules(jsqrc Core) +target_link_libraries(jsqrc Qt5::Core) install( TARGETS jsqrc ARCHIVE DESTINATION lib LIBRARY DESTINATION lib ) diff --git a/liblll/CMakeLists.txt b/liblll/CMakeLists.txt index 28e5cb758..fb79d5873 100644 --- a/liblll/CMakeLists.txt +++ b/liblll/CMakeLists.txt @@ -17,6 +17,7 @@ include_directories(..) set(EXECUTABLE lll) file(GLOB HEADERS "*.h") + if(ETH_STATIC) add_library(${EXECUTABLE} STATIC ${SRC_LIST} ${HEADERS}) else() diff --git a/libp2p/CMakeLists.txt b/libp2p/CMakeLists.txt index 8c5d49da0..f542afd0f 100644 --- a/libp2p/CMakeLists.txt +++ b/libp2p/CMakeLists.txt @@ -17,6 +17,7 @@ include_directories(${LEVELDB_INCLUDE_DIR}) set(EXECUTABLE p2p) file(GLOB HEADERS "*.h") + if(ETH_STATIC) add_library(${EXECUTABLE} STATIC ${SRC_LIST} ${HEADERS}) else() @@ -24,8 +25,9 @@ else() endif() target_link_libraries(${EXECUTABLE} ${LEVELDB_LIBRARY}) + if(MINIUPNPC_FOUND) -target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARY}) + target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARY}) endif() target_link_libraries(${EXECUTABLE} devcrypto) diff --git a/libpyserpent/CMakeLists.txt b/libpyserpent/CMakeLists.txt index e6f32ec81..1ffa49ac0 100644 --- a/libpyserpent/CMakeLists.txt +++ b/libpyserpent/CMakeLists.txt @@ -4,11 +4,11 @@ aux_source_directory(. SRC_LIST) set(EXECUTABLE pyserpent) -# set(CMAKE_INSTALL_PREFIX ../lib) -add_library(${EXECUTABLE} SHARED ${SRC_LIST}) - file(GLOB HEADERS "*.h") +# set(CMAKE_INSTALL_PREFIX ../lib) +add_library(${EXECUTABLE} SHARED ${SRC_LIST} ${HEADERS}) + include_directories(..) target_link_libraries(${EXECUTABLE} serpent) @@ -17,26 +17,6 @@ target_link_libraries(${EXECUTABLE} evmcore) target_link_libraries(${EXECUTABLE} devcore) target_link_libraries(${EXECUTABLE} ${PYTHON_LS}) -if("${TARGET_PLATFORM}" STREQUAL "w64") - target_link_libraries(${EXECUTABLE} boost_thread_win32-mt-s) - target_link_libraries(${EXECUTABLE} iphlpapi) - target_link_libraries(${EXECUTABLE} ws2_32) - target_link_libraries(${EXECUTABLE} mswsock) - target_link_libraries(${EXECUTABLE} shlwapi) -elseif (APPLE) - # Latest mavericks boost libraries only come with -mt - target_link_libraries(${EXECUTABLE} boost_thread-mt) - find_package(Threads REQUIRED) - target_link_libraries(${EXECUTABLE} ${CMAKE_THREAD_LIBS_INIT}) -elseif (UNIX) - target_link_libraries(${EXECUTABLE} ${Boost_THREAD_LIBRARY}) - target_link_libraries(${EXECUTABLE} ${CMAKE_THREAD_LIBS_INIT}) -else () - target_link_libraries(${EXECUTABLE} boost_thread) - find_package(Threads REQUIRED) - target_link_libraries(${EXECUTABLE} ${CMAKE_THREAD_LIBS_INIT}) -endif () - install( TARGETS ${EXECUTABLE} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib ) install( FILES ${HEADERS} DESTINATION include/${EXECUTABLE} ) diff --git a/libqethereum/CMakeLists.txt b/libqethereum/CMakeLists.txt index 9585943f0..e2c8f9a05 100644 --- a/libqethereum/CMakeLists.txt +++ b/libqethereum/CMakeLists.txt @@ -12,8 +12,8 @@ endif() set(CMAKE_INCLUDE_CURRENT_DIR ON) aux_source_directory(. SRC_LIST) -include_directories(..) include_directories(${JSON_RPC_CPP_INCLUDE_DIRS}) +include_directories(..) set(EXECUTABLE qethereum) @@ -25,11 +25,18 @@ else() add_library(${EXECUTABLE} SHARED ${RESOURCE_ADDED} ${SRC_LIST} ${HEADERS}) endif() -qt5_use_modules(${EXECUTABLE} Core Gui WebKit WebKitWidgets Widgets Network Quick Qml) -target_link_libraries(${EXECUTABLE} ethereum) -target_link_libraries(${EXECUTABLE} secp256k1) +target_link_libraries(${EXECUTABLE} Qt5::Core) +target_link_libraries(${EXECUTABLE} Qt5::Gui) +target_link_libraries(${EXECUTABLE} Qt5::WebKit) +target_link_libraries(${EXECUTABLE} Qt5::WebKitWidgets) +target_link_libraries(${EXECUTABLE} Qt5::Widgets) +target_link_libraries(${EXECUTABLE} Qt5::Network) +target_link_libraries(${EXECUTABLE} Qt5::Quick) +target_link_libraries(${EXECUTABLE} Qt5::Qml) target_link_libraries(${EXECUTABLE} ${JSON_RPC_CPP_COMMON_LIBRARY}) target_link_libraries(${EXECUTABLE} ${JSON_RPC_CPP_SERVER_LIBRARY}) +target_link_libraries(${EXECUTABLE} ethereum) +target_link_libraries(${EXECUTABLE} secp256k1) install( TARGETS ${EXECUTABLE} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib ) install( FILES ${HEADERS} DESTINATION include/${EXECUTABLE} ) diff --git a/libserpent/CMakeLists.txt b/libserpent/CMakeLists.txt index e28aeb032..1c5b8e147 100644 --- a/libserpent/CMakeLists.txt +++ b/libserpent/CMakeLists.txt @@ -16,6 +16,7 @@ include_directories(..) set(EXECUTABLE serpent) file(GLOB HEADERS "*.h") + if(ETH_STATIC) add_library(${EXECUTABLE} STATIC ${SRC_LIST} ${HEADERS}) else() diff --git a/libsolidity/CMakeLists.txt b/libsolidity/CMakeLists.txt index 44a7b9bb2..0a0b62bdd 100644 --- a/libsolidity/CMakeLists.txt +++ b/libsolidity/CMakeLists.txt @@ -18,15 +18,16 @@ include_directories(..) set(EXECUTABLE solidity) file(GLOB HEADERS "*.h") -if(ETH_STATIC) + +if (ETH_STATIC) add_library(${EXECUTABLE} STATIC ${SRC_LIST} ${HEADERS}) else() add_library(${EXECUTABLE} SHARED ${SRC_LIST} ${HEADERS}) endif() +target_link_libraries(${EXECUTABLE} ${JSONCPP_LIBRARIES}) target_link_libraries(${EXECUTABLE} evmcore) target_link_libraries(${EXECUTABLE} devcore) -target_link_libraries(${EXECUTABLE} ${JSONCPP_LIBRARIES}) install( TARGETS ${EXECUTABLE} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib ) install( FILES ${HEADERS} DESTINATION include/${EXECUTABLE} ) diff --git a/libweb3jsonrpc/CMakeLists.txt b/libweb3jsonrpc/CMakeLists.txt index 3c5d589ca..74fea58b7 100644 --- a/libweb3jsonrpc/CMakeLists.txt +++ b/libweb3jsonrpc/CMakeLists.txt @@ -9,9 +9,9 @@ set(CMAKE_AUTOMOC OFF) aux_source_directory(. SRC_LIST) -include_directories(..) include_directories(${JSON_RPC_CPP_INCLUDE_DIRS}) include_directories(${LEVELDB_INCLUDE_DIR}) +include_directories(..) set(EXECUTABLE web3jsonrpc) diff --git a/libwebthree/CMakeLists.txt b/libwebthree/CMakeLists.txt index 20b4ee603..837ecb313 100644 --- a/libwebthree/CMakeLists.txt +++ b/libwebthree/CMakeLists.txt @@ -17,7 +17,8 @@ include_directories(..) set(EXECUTABLE webthree) file(GLOB HEADERS "*.h") -if(ETH_STATIC) + +if (ETH_STATIC) add_library(${EXECUTABLE} STATIC ${SRC_LIST} ${HEADERS}) else() add_library(${EXECUTABLE} SHARED ${SRC_LIST} ${HEADERS}) @@ -25,8 +26,8 @@ endif() target_link_libraries(${EXECUTABLE} ${LEVELDB_LIBRARY}) -if(MINIUPNPC_FOUND) -target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARY}) +if (MINIUPNPC_FOUND) + target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARY}) endif() target_link_libraries(${EXECUTABLE} ethereum) diff --git a/libwhisper/CMakeLists.txt b/libwhisper/CMakeLists.txt index b0bb20b2b..8beb1b988 100644 --- a/libwhisper/CMakeLists.txt +++ b/libwhisper/CMakeLists.txt @@ -17,7 +17,8 @@ include_directories(${LEVELDB_INCLUDE_DIR}) set(EXECUTABLE whisper) file(GLOB HEADERS "*.h") -if(ETH_STATIC) + +if (ETH_STATIC) add_library(${EXECUTABLE} STATIC ${SRC_LIST} ${HEADERS}) else() add_library(${EXECUTABLE} SHARED ${SRC_LIST} ${HEADERS}) @@ -25,8 +26,8 @@ endif() target_link_libraries(${EXECUTABLE} ${LEVELDB_LIBRARY}) -if(MINIUPNPC_FOUND) -target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARY}) +if (MINIUPNPC_FOUND) + target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARY}) endif() target_link_libraries(${EXECUTABLE} ethcore) diff --git a/mix/CMakeLists.txt b/mix/CMakeLists.txt index ce8099ce0..8f73c546b 100644 --- a/mix/CMakeLists.txt +++ b/mix/CMakeLists.txt @@ -31,7 +31,7 @@ if (APPLE) set(MACOSX_BUNDLE_ICON_FILE mix) include(BundleUtilities) - add_executable(${EXECUTABLE} MACOSX_BUNDLE ${SRC_LIST} ${HEADERS} ${UI_RESOURCES}) + add_executable(${EXECUTABLE} MACOSX_BUNDLE ${SRC_LIST} ${HEADERS} ${UI_RESOURCES}) set_target_properties(${EXECUTABLE} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/EthereumMacOSXBundleInfo.plist.in") SET_SOURCE_FILES_PROPERTIES(${EXECUTABLE} PROPERTIES MACOSX_PACKAGE_LOCATION MacOS) SET_SOURCE_FILES_PROPERTIES(${MACOSX_BUNDLE_ICON_FILE}.icns PROPERTIES MACOSX_PACKAGE_LOCATION "Resources") diff --git a/neth/CMakeLists.txt b/neth/CMakeLists.txt index 731f1e4fc..14d710ef2 100644 --- a/neth/CMakeLists.txt +++ b/neth/CMakeLists.txt @@ -14,12 +14,12 @@ add_dependencies(${EXECUTABLE} BuildInfo.h) target_link_libraries(${EXECUTABLE} ${LEVELDB_LIBRARY}) -if(MINIUPNPC_FOUND) +if (MINIUPNPC_FOUND) target_link_libraries(${EXECUTABLE} ${MINIUPNPC_LIBRARY}) endif() -if(JSON_RPC_CPP_FOUND) - target_link_libraries(${EXECUTABLE} web3jsonrpc) +if (JSONRPC) + target_link_libraries(${EXECUTABLE} web3jsonrpc) endif() target_link_libraries(${EXECUTABLE} webthree) diff --git a/secp256k1/CMakeLists.txt b/secp256k1/CMakeLists.txt index cc4f1b87c..747d5e1cb 100644 --- a/secp256k1/CMakeLists.txt +++ b/secp256k1/CMakeLists.txt @@ -24,7 +24,8 @@ if (APPLE OR UNIX) else() include_directories(${Boost_INCLUDE_DIRS}) - if(ETH_STATIC) + + if (ETH_STATIC) add_library(${EXECUTABLE} STATIC ${EXECUTABLE}.c) else() add_library(${EXECUTABLE} SHARED ${EXECUTABLE}.c) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 3beb36643..440334964 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -20,7 +20,7 @@ target_link_libraries(testeth webthree) target_link_libraries(testeth ${Boost_UNIT_TEST_FRAMEWORK_LIBRARY_RELEASE}) target_link_libraries(testeth ${CURL_LIBRARY}) -if (JSON_RPC_CPP_FOUND) +if (JSONRPC) target_link_libraries(testeth web3jsonrpc) target_link_libraries(testeth ${JSON_RPC_CPP_CLIENT_LIBRARY}) endif() diff --git a/walleth/CMakeLists.txt b/walleth/CMakeLists.txt index 26e010b97..44bf5f0f9 100644 --- a/walleth/CMakeLists.txt +++ b/walleth/CMakeLists.txt @@ -85,7 +85,7 @@ if (APPLE) install(CODE " include(BundleUtilities) set(BU_CHMOD_BUNDLE_ITEMS 1) - fixup_bundle(\"${APPS}\" \"${BUNDLELIBS}\" \"../libqethereum ../libethereum ../secp256k1\") + fixup_bundle(\"${APPS}\" \"${BUNDLELIBS}\" \"../libqethereum ../libethereum ../secp256k1\") " COMPONENT RUNTIME ) if (${ADDFRAMEWORKS}) @@ -96,22 +96,7 @@ if (APPLE) ) endif () -elseif ("${TARGET_PLATFORM}" STREQUAL "w64") - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fno-keep-inline-dllexport -static-libgcc -static-libstdc++ -static") - set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-s -Wl,-subsystem,windows -mthreads -L/usr/x86_64-w64-mingw32/plugins/platforms") - target_link_libraries(${EXECUTEABLE} gcc) - target_link_libraries(${EXECUTEABLE} mingw32 qtmain mswsock iphlpapi qwindows shlwapi Qt5PlatformSupport gdi32 comdlg32 oleaut32 imm32 winmm ole32 uuid ws2_32) - target_link_libraries(${EXECUTEABLE} boost_system-mt-s) - target_link_libraries(${EXECUTEABLE} boost_filesystem-mt-s) - target_link_libraries(${EXECUTEABLE} boost_thread_win32-mt-s) - target_link_libraries(${EXECUTEABLE} Qt5PlatformSupport) - set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS) -elseif (UNIX) else () - target_link_libraries(${EXECUTEABLE} boost_system) - target_link_libraries(${EXECUTEABLE} boost_filesystem) - find_package(Threads REQUIRED) - target_link_libraries(${EXECUTEABLE} ${CMAKE_THREAD_LIBS_INIT}) install( TARGETS ${EXECUTEABLE} RUNTIME DESTINATION bin ) endif ()