Browse Source

jsonrpc option in cmakes, removed all warnings

cl-refactor
Marek Kotewicz 10 years ago
parent
commit
281a9e2b22
  1. 50
      CMakeLists.txt
  2. 11
      alethzero/CMakeLists.txt
  3. 46
      cmake/EthDependencies.cmake
  4. 7
      libdevcore/CMakeLists.txt
  5. 6
      libdevcrypto/CMakeLists.txt
  6. 6
      libethcore/CMakeLists.txt
  7. 8
      libethereum/CMakeLists.txt
  8. 6
      libevm/CMakeLists.txt
  9. 6
      libevmcore/CMakeLists.txt
  10. 5
      libjsqrc/CMakeLists.txt
  11. 6
      liblll/CMakeLists.txt
  12. 6
      libp2p/CMakeLists.txt
  13. 9
      libqethereum/CMakeLists.txt
  14. 6
      libserpent/CMakeLists.txt
  15. 6
      libsolidity/CMakeLists.txt
  16. 8
      libweb3jsonrpc/CMakeLists.txt
  17. 8
      libwebthree/CMakeLists.txt
  18. 8
      libwhisper/CMakeLists.txt
  19. 11
      mix/CMakeLists.txt
  20. 6
      secp256k1/CMakeLists.txt
  21. 74
      third/CMakeLists.txt

50
CMakeLists.txt

@ -15,6 +15,7 @@ function(createDefaultCacheConfig)
set(LANGUAGES OFF CACHE BOOL "Limit build to Serpent/LLL tools") set(LANGUAGES OFF CACHE BOOL "Limit build to Serpent/LLL tools")
set(VMTRACE OFF CACHE BOOL "VM tracing and run-time checks (useful for cross-implementation VM debugging)") set(VMTRACE OFF CACHE BOOL "VM tracing and run-time checks (useful for cross-implementation VM debugging)")
set(PARANOIA OFF CACHE BOOL "Additional run-time checks") set(PARANOIA OFF CACHE BOOL "Additional run-time checks")
set(JSONRPC ON CACHE BOOL "Build with jsonprc. default on")
endfunction() endfunction()
@ -85,7 +86,7 @@ cmake_policy(SET CMP0015 NEW)
createDefaultCacheConfig() createDefaultCacheConfig()
configureProject() configureProject()
message("-- LANGUAGES: ${LANGUAGES}; VMTRACE: ${VMTRACE}; PARANOIA: ${PARANOIA}; HEADLESS: ${HEADLESS}") message("-- LANGUAGES: ${LANGUAGES}; VMTRACE: ${VMTRACE}; PARANOIA: ${PARANOIA}; HEADLESS: ${HEADLESS}; JSONRPC: ${JSONRPC}")
# Default TARGET_PLATFORM to "linux". # Default TARGET_PLATFORM to "linux".
@ -107,23 +108,27 @@ include(EthDependencies)
createBuildInfo() createBuildInfo()
add_subdirectory(libdevcore) # TODO discuss that during PR. are we still using that?
add_subdirectory(libevmcore)
add_subdirectory(liblll)
add_subdirectory(libserpent)
add_subdirectory(libsolidity)
if(NOT APPLE) if(NOT APPLE)
if(PYTHON_LS) if(PYTHON_LS)
add_subdirectory(libpyserpent) add_subdirectory(libpyserpent)
endif() endif()
endif() endif()
add_subdirectory(libdevcore)
add_subdirectory(libevmcore)
add_subdirectory(liblll)
add_subdirectory(libserpent)
add_subdirectory(libsolidity)
add_subdirectory(lllc) add_subdirectory(lllc)
add_subdirectory(solc) add_subdirectory(solc)
add_subdirectory(sc) add_subdirectory(sc)
if (JSON_RPC_CPP_FOUND)
if (JSONRPC)
add_subdirectory(libweb3jsonrpc) add_subdirectory(libweb3jsonrpc)
endif() endif()
if (NOT LANGUAGES) if (NOT LANGUAGES)
add_subdirectory(secp256k1) add_subdirectory(secp256k1)
add_subdirectory(libp2p) add_subdirectory(libp2p)
@ -133,6 +138,8 @@ if (NOT LANGUAGES)
add_subdirectory(libethcore) add_subdirectory(libethcore)
add_subdirectory(libevm) add_subdirectory(libevm)
add_subdirectory(libethereum) add_subdirectory(libethereum)
# TODO is this 'TODO remove' still valid?
# add_subdirectory(libethereumx) # TODO remove # add_subdirectory(libethereumx) # TODO remove
add_subdirectory(libwebthree) add_subdirectory(libwebthree)
@ -141,38 +148,39 @@ if (NOT LANGUAGES)
if("x${CMAKE_BUILD_TYPE}" STREQUAL "xDebug") if("x${CMAKE_BUILD_TYPE}" STREQUAL "xDebug")
add_subdirectory(exp) add_subdirectory(exp)
endif () endif ()
# TODO check msvc
if(NOT ("${TARGET_PLATFORM}" STREQUAL "w64")) if(NOT ("${TARGET_PLATFORM}" STREQUAL "w64"))
add_subdirectory(neth) add_subdirectory(neth)
endif () endif ()
if(QTQML)
add_definitions(-DETH_QTQML)
endif()
if(NOT HEADLESS) # TODO discuss that during PR. are we still using that?
#if(QTQML)
#add_definitions(-DETH_QTQML)
#endif()
if (NOT HEADLESS)
# TODO move that somewhere else!
if ("${TARGET_PLATFORM}" STREQUAL "w64") if ("${TARGET_PLATFORM}" STREQUAL "w64")
cmake_policy(SET CMP0020 NEW) cmake_policy(SET CMP0020 NEW)
endif () endif ()
if (NOT JSON_RPC_CPP_FOUND)
message(FATAL_ERROR "Alethzero requires jsonrpc.")
endif()
add_subdirectory(libjsqrc) add_subdirectory(libjsqrc)
add_subdirectory(libqethereum) add_subdirectory(libqethereum)
if (NOT JSON_RPC_CPP_FOUND)
message (FATAL_ERROR "AlethZero requires json-rpc-cpp!")
else()
add_subdirectory(alethzero) add_subdirectory(alethzero)
endif()
add_subdirectory(third) add_subdirectory(third)
add_subdirectory(mix) add_subdirectory(mix)
if(QTQML)
# TODO discuss that during PR. are we still using that?
#if(QTQML)
#add_subdirectory(iethxi) #add_subdirectory(iethxi)
#add_subdirectory(walleth) // resurect once we want to submit ourselves to QML. #add_subdirectory(walleth) // resurect once we want to submit ourselves to QML.
endif() #endif()
endif() endif()
endif() endif()
enable_testing() enable_testing()
add_test(NAME alltests WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/test COMMAND testeth) add_test(NAME alltests WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/test COMMAND testeth)

11
alethzero/CMakeLists.txt

@ -1,4 +1,9 @@
cmake_policy(SET CMP0015 OLD) cmake_policy(SET CMP0015 NEW)
# this policy was introduced in cmake 3.0
# remove if, once 3.0 will be used on unix
if (APPLE)
cmake_policy(SET CMP0043 OLD)
endif()
set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_INCLUDE_CURRENT_DIR ON)
aux_source_directory(. SRC_LIST) aux_source_directory(. SRC_LIST)
@ -36,7 +41,7 @@ endif ()
add_dependencies(${EXECUTABLE} BuildInfo.h) add_dependencies(${EXECUTABLE} BuildInfo.h)
qt5_use_modules(${EXECUTABLE} Core) target_link_libraries(${EXECUTABLE} Qt5::Core)
target_link_libraries(${EXECUTABLE} ${JSONCPP_LIBRARIES}) target_link_libraries(${EXECUTABLE} ${JSONCPP_LIBRARIES})
target_link_libraries(${EXECUTABLE} webthree) target_link_libraries(${EXECUTABLE} webthree)
target_link_libraries(${EXECUTABLE} qethereum) target_link_libraries(${EXECUTABLE} qethereum)
@ -57,7 +62,7 @@ if (APPLE)
# First have qt5 install plugins and frameworks # First have qt5 install plugins and frameworks
# replace CMAKE_PREFIX_PATH with QT_PATH ? # replace CMAKE_PREFIX_PATH with QT_PATH ?
add_custom_command(TARGET ${EXECUTABLE} POST_BUILD add_custom_command(TARGET ${EXECUTABLE} POST_BUILD
COMMAND ${CMAKE_PREFIX_PATH}/bin/macdeployqt ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${EXECUTABLE}.app COMMAND ${CMAKE_DEPENDENCY_INSTALL_DIR}/bin/macdeployqt ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${EXECUTABLE}.app
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
# This tool and next will inspect linked libraries in order to determine which dependencies are required # This tool and next will inspect linked libraries in order to determine which dependencies are required

46
cmake/EthDependencies.cmake

@ -36,12 +36,17 @@ message(" - Jsoncpp lib : ${JSONCPP_LIBRARIES}")
# json-rpc-cpp support is currently not mandatory # json-rpc-cpp support is currently not mandatory
# TODO make headless client optional # TODO make headless client optional
# TODO get rid of -DETH_JSONRPC # TODO get rid of -DETH_JSONRPC
find_package (JsonRpcCpp 0.3.2) if (JSONRPC)
if (JSON_RPC_CPP_FOUND)
find_package (JsonRpcCpp 0.3.2)
if (NOT JSON_RPC_CPP_FOUND)
message (FATAL_ERROR "JSONRPC 0.3.2. not found")
endif()
message (" - json-rpc-cpp header: ${JSON_RPC_CPP_INCLUDE_DIRS}") message (" - json-rpc-cpp header: ${JSON_RPC_CPP_INCLUDE_DIRS}")
message (" - json-rpc-cpp lib : ${JSON_RPC_CPP_LIBRARIES}") message (" - json-rpc-cpp lib : ${JSON_RPC_CPP_LIBRARIES}")
add_definitions(-DETH_JSONRPC) add_definitions(-DETH_JSONRPC)
endif()
endif() #JSONRPC
# TODO readline package does not yet check for correct version number # TODO readline package does not yet check for correct version number
# TODO make readline package dependent on cmake options # TODO make readline package dependent on cmake options
@ -77,36 +82,45 @@ find_package (CURL)
message(" - curl header: ${CURL_INCLUDE_DIR}") message(" - curl header: ${CURL_INCLUDE_DIR}")
message(" - curl lib : ${CURL_LIBRARY}") message(" - curl lib : ${CURL_LIBRARY}")
# do not compile GUI
if (NOT HEADLESS)
# we need json rpc to build alethzero
if (NOT JSON_RPC_CPP_FOUND)
message (FATAL_ERROR "JSONRPC is required for GUI client")
endif()
# find all of the Qt packages # find all of the Qt packages
# remember to use 'Qt' instead of 'QT', cause unix is case sensitive # remember to use 'Qt' instead of 'QT', cause unix is case sensitive
# TODO make headless client optional # TODO make headless client optional
find_package (Qt5Core REQUIRED) find_package (Qt5Core REQUIRED)
find_package (Qt5Gui REQUIRED) find_package (Qt5Gui REQUIRED)
find_package (Qt5Quick REQUIRED) find_package (Qt5Quick REQUIRED)
find_package (Qt5Qml REQUIRED) find_package (Qt5Qml REQUIRED)
find_package (Qt5Network REQUIRED) find_package (Qt5Network REQUIRED)
find_package (Qt5Widgets REQUIRED) find_package (Qt5Widgets REQUIRED)
find_package (Qt5WebKit REQUIRED) find_package (Qt5WebKit REQUIRED)
find_package (Qt5WebKitWidgets REQUIRED) find_package (Qt5WebKitWidgets REQUIRED)
endif() #HEADLESS
# use multithreaded boost libraries, with -mt suffix # use multithreaded boost libraries, with -mt suffix
set(Boost_USE_MULTITHREADED ON) set(Boost_USE_MULTITHREADED ON)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# TODO hanlde other msvc versions or it will fail find them # TODO hanlde other msvc versions or it will fail find them
set(Boost_COMPILER -vc120) set(Boost_COMPILER -vc120)
# use static boost libraries *.lib # use static boost libraries *.lib
set(Boost_USE_STATIC_LIBS ON) set(Boost_USE_STATIC_LIBS ON)
elseif (APPLE) elseif (APPLE)
# use static boost libraries *.a # use static boost libraries *.a
set(Boost_USE_STATIC_LIBS ON) set(Boost_USE_STATIC_LIBS ON)
elseif (UNIX) elseif (UNIX)
# use dynamic boost libraries .dll
# use dynamic boost libraries .dll
set(Boost_USE_STATIC_LIBS OFF) set(Boost_USE_STATIC_LIBS OFF)
endif() endif()

7
libdevcore/CMakeLists.txt

@ -1,4 +1,11 @@
cmake_policy(SET CMP0015 OLD) cmake_policy(SET CMP0015 OLD)
# this policy was introduced in cmake 3.0
# remove if, once 3.0 will be used on unix
if (APPLE)
# old policy do not use MACOSX_RPATH
cmake_policy(SET CMP0042 OLD)
endif()
set(CMAKE_AUTOMOC OFF) set(CMAKE_AUTOMOC OFF)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB")

6
libdevcrypto/CMakeLists.txt

@ -1,4 +1,10 @@
cmake_policy(SET CMP0015 OLD) cmake_policy(SET CMP0015 OLD)
# this policy was introduced in cmake 3.0
# remove if, once 3.0 will be used on unix
if (APPLE)
# old policy do not use MACOSX_RPATH
cmake_policy(SET CMP0042 OLD)
endif()
set(CMAKE_AUTOMOC OFF) set(CMAKE_AUTOMOC OFF)
aux_source_directory(. SRC_LIST) aux_source_directory(. SRC_LIST)

6
libethcore/CMakeLists.txt

@ -1,4 +1,10 @@
cmake_policy(SET CMP0015 NEW) cmake_policy(SET CMP0015 NEW)
# this policy was introduced in cmake 3.0
# remove if, once 3.0 will be used on unix
if (APPLE)
# old policy do not use MACOSX_RPATH
cmake_policy(SET CMP0042 OLD)
endif()
set(CMAKE_AUTOMOC OFF) set(CMAKE_AUTOMOC OFF)
aux_source_directory(. SRC_LIST) aux_source_directory(. SRC_LIST)

8
libethereum/CMakeLists.txt

@ -1,4 +1,10 @@
cmake_policy(SET CMP0015 OLD) cmake_policy(SET CMP0015 NEW)
# this policy was introduced in cmake 3.0
# remove if, once 3.0 will be used on unix
if (APPLE)
# old policy do not use MACOSX_RPATH
cmake_policy(SET CMP0042 OLD)
endif()
set(CMAKE_AUTOMOC OFF) set(CMAKE_AUTOMOC OFF)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB")

6
libevm/CMakeLists.txt

@ -1,4 +1,10 @@
cmake_policy(SET CMP0015 NEW) cmake_policy(SET CMP0015 NEW)
# this policy was introduced in cmake 3.0
# remove if, once 3.0 will be used on unix
if (APPLE)
# old policy do not use MACOSX_RPATH
cmake_policy(SET CMP0042 OLD)
endif()
set(CMAKE_AUTOMOC OFF) set(CMAKE_AUTOMOC OFF)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB")

6
libevmcore/CMakeLists.txt

@ -1,4 +1,10 @@
cmake_policy(SET CMP0015 NEW) cmake_policy(SET CMP0015 NEW)
# this policy was introduced in cmake 3.0
# remove if, once 3.0 will be used on unix
if (APPLE)
# old policy do not use MACOSX_RPATH
cmake_policy(SET CMP0042 OLD)
endif()
set(CMAKE_AUTOMOC OFF) set(CMAKE_AUTOMOC OFF)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB")

5
libjsqrc/CMakeLists.txt

@ -1,4 +1,9 @@
cmake_policy(SET CMP0015 NEW) cmake_policy(SET CMP0015 NEW)
# this policy was introduced in cmake 3.0
# remove if, once 3.0 will be used on unix
if (APPLE)
cmake_policy(SET CMP0043 OLD)
endif()
set(CMAKE_AUTOMOC OFF) set(CMAKE_AUTOMOC OFF)
qt5_add_resources(JSQRC js.qrc) qt5_add_resources(JSQRC js.qrc)

6
liblll/CMakeLists.txt

@ -1,4 +1,10 @@
cmake_policy(SET CMP0015 NEW) cmake_policy(SET CMP0015 NEW)
# this policy was introduced in cmake 3.0
# remove if, once 3.0 will be used on unix
if (APPLE)
# old policy do not use MACOSX_RPATH
cmake_policy(SET CMP0042 OLD)
endif()
set(CMAKE_AUTOMOC OFF) set(CMAKE_AUTOMOC OFF)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB")

6
libp2p/CMakeLists.txt

@ -1,4 +1,10 @@
cmake_policy(SET CMP0015 NEW) cmake_policy(SET CMP0015 NEW)
# this policy was introduced in cmake 3.0
# remove if, once 3.0 will be used on unix
if (APPLE)
# old policy do not use MACOSX_RPATH
cmake_policy(SET CMP0042 OLD)
endif()
set(CMAKE_AUTOMOC OFF) set(CMAKE_AUTOMOC OFF)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB")

9
libqethereum/CMakeLists.txt

@ -1,4 +1,11 @@
cmake_policy(SET CMP0015 OLD) cmake_policy(SET CMP0015 NEW)
# this policy was introduced in cmake 3.0
# remove if, once 3.0 will be used on unix
if (APPLE)
# old policy do not use MACOSX_RPATH
cmake_policy(SET CMP0042 OLD)
cmake_policy(SET CMP0043 OLD)
endif()
set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_INCLUDE_CURRENT_DIR ON)
aux_source_directory(. SRC_LIST) aux_source_directory(. SRC_LIST)

6
libserpent/CMakeLists.txt

@ -1,4 +1,10 @@
cmake_policy(SET CMP0015 NEW) cmake_policy(SET CMP0015 NEW)
# this policy was introduced in cmake 3.0
# remove if, once 3.0 will be used on unix
if (APPLE)
# old policy do not use MACOSX_RPATH
cmake_policy(SET CMP0042 OLD)
endif()
set(CMAKE_AUTOMOC OFF) set(CMAKE_AUTOMOC OFF)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB")

6
libsolidity/CMakeLists.txt

@ -1,4 +1,10 @@
cmake_policy(SET CMP0015 NEW) cmake_policy(SET CMP0015 NEW)
# this policy was introduced in cmake 3.0
# remove if, once 3.0 will be used on unix
if (APPLE)
# old policy do not use MACOSX_RPATH
cmake_policy(SET CMP0042 OLD)
endif()
set(CMAKE_AUTOMOC OFF) set(CMAKE_AUTOMOC OFF)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB")

8
libweb3jsonrpc/CMakeLists.txt

@ -1,4 +1,10 @@
cmake_policy(SET CMP0015 OLD) cmake_policy(SET CMP0015 NEW)
# this policy was introduced in cmake 3.0
# remove if, once 3.0 will be used on unix
if (APPLE)
# old policy do not use MACOSX_RPATH
cmake_policy(SET CMP0042 OLD)
endif()
set(CMAKE_AUTOMOC OFF) set(CMAKE_AUTOMOC OFF)
aux_source_directory(. SRC_LIST) aux_source_directory(. SRC_LIST)

8
libwebthree/CMakeLists.txt

@ -1,4 +1,10 @@
cmake_policy(SET CMP0015 OLD) cmake_policy(SET CMP0015 NEW)
# this policy was introduced in cmake 3.0
# remove if, once 3.0 will be used on unix
if (APPLE)
# old policy do not use MACOSX_RPATH
cmake_policy(SET CMP0042 OLD)
endif()
set(CMAKE_AUTOMOC OFF) set(CMAKE_AUTOMOC OFF)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB")

8
libwhisper/CMakeLists.txt

@ -1,4 +1,10 @@
cmake_policy(SET CMP0015 OLD) cmake_policy(SET CMP0015 NEW)
# this policy was introduced in cmake 3.0
# remove if, once 3.0 will be used on unix
if (APPLE)
# old policy do not use MACOSX_RPATH
cmake_policy(SET CMP0042 OLD)
endif()
set(CMAKE_AUTOMOC OFF) set(CMAKE_AUTOMOC OFF)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DSTATICLIB")

11
mix/CMakeLists.txt

@ -1,9 +1,14 @@
cmake_policy(SET CMP0015 NEW)
# this policy was introduced in cmake 3.0
# remove if, once 3.0 will be used on unix
if (APPLE)
cmake_policy(SET CMP0043 OLD)
endif()
set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_INCLUDE_CURRENT_DIR ON)
aux_source_directory(. SRC_LIST) aux_source_directory(. SRC_LIST)
include_directories(..) include_directories(..)
#qt5_wrap_ui(ui_Main.h Main.ui)
qt5_add_resources(UI_RESOURCES qml.qrc) qt5_add_resources(UI_RESOURCES qml.qrc)
# Set name of binary and add_executable() # Set name of binary and add_executable()
@ -54,7 +59,7 @@ target_link_libraries(${EXECUTEABLE} jsqrc)
if (APPLE) if (APPLE)
# First have qt5 install plugins and frameworks # First have qt5 install plugins and frameworks
add_custom_command(TARGET ${EXECUTEABLE} POST_BUILD add_custom_command(TARGET ${EXECUTEABLE} POST_BUILD
COMMAND /usr/local/opt/qt5/bin/macdeployqt -qmldir=${CMAKE_CURRENT_SOURCE_DIR}/qml ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${EXECUTEABLE}.app COMMAND ${CMAKE_DEPENDENCY_INSTALL_DIR}/bin/macdeployqt -qmldir=${CMAKE_CURRENT_SOURCE_DIR}/qml ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${EXECUTEABLE}.app
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
# This tool and next will inspect linked libraries in order to determine which dependencies are required # This tool and next will inspect linked libraries in order to determine which dependencies are required

6
secp256k1/CMakeLists.txt

@ -1,4 +1,10 @@
cmake_policy(SET CMP0015 NEW) cmake_policy(SET CMP0015 NEW)
# this policy was introduced in cmake 3.0
# remove if, once 3.0 will be used on unix
if (APPLE)
# old policy do not use MACOSX_RPATH
cmake_policy(SET CMP0042 OLD)
endif()
set(CMAKE_AUTOMOC OFF) set(CMAKE_AUTOMOC OFF)
set(CMAKE_ASM_COMPILER "yasm") set(CMAKE_ASM_COMPILER "yasm")

74
third/CMakeLists.txt

@ -1,26 +1,21 @@
cmake_policy(SET CMP0015 NEW)
# this policy was introduced in cmake 3.0
# remove if, once 3.0 will be used on unix
if (APPLE)
cmake_policy(SET CMP0043 OLD)
endif()
set(CMAKE_INCLUDE_CURRENT_DIR ON) set(CMAKE_INCLUDE_CURRENT_DIR ON)
aux_source_directory(. SRC_LIST) aux_source_directory(. SRC_LIST)
include_directories(..) include_directories(..)
include_directories(${JSON_RPC_CPP_INCLUDE_DIRS}) include_directories(${JSON_RPC_CPP_INCLUDE_DIRS})
if (APPLE)
# Add homebrew path for qt5
#set(CMAKE_PREFIX_PATH /usr/local/opt/qt5)
#include_directories(/usr/local/opt/qt5/include /usr/local/include)
elseif ("${TARGET_PLATFORM}" STREQUAL "w64")
set(SRC_LIST ${SRC_LIST} ../windows/qt_plugin_import.cpp)
include_directories(/usr/x86_64-w64-mingw32/include /usr/x86_64-w64-mingw32/include/QtCore /usr/x86_64-w64-mingw32/include/QtGui /usr/x86_64-w64-mingw32/include/QtQuick /usr/x86_64-w64-mingw32/include/QtQml /usr/x86_64-w64-mingw32/include/QtNetwork /usr/x86_64-w64-mingw32/include/QtWidgets /usr/x86_64-w64-mingw32/include/QtWebKit /usr/x86_64-w64-mingw32/include/QtWebKitWidgets)
elseif (UNIX)
set(CMAKE_PREFIX_PATH ${CMAKE_PREFIX_PATH} ";$ENV{QTDIR}/lib/cmake")
endif ()
qt5_wrap_ui(ui_Main.h Main.ui) qt5_wrap_ui(ui_Main.h Main.ui)
# Set name of binary and add_executable() # Set name of binary and add_executable()
file(GLOB HEADERS "*.h") file(GLOB HEADERS "*.h")
if (APPLE) if (APPLE)
set(EXECUTEABLE Third) set(EXECUTABLE Third)
set(BIN_INSTALL_DIR ".") set(BIN_INSTALL_DIR ".")
set(DOC_INSTALL_DIR ".") set(DOC_INSTALL_DIR ".")
@ -31,34 +26,45 @@ if (APPLE)
set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${PROJECT_VERSION}") set(MACOSX_BUNDLE_SHORT_VERSION_STRING "${PROJECT_VERSION}")
set(MACOSX_BUNDLE_COPYRIGHT "${PROJECT_COPYRIGHT_YEAR} ${PROJECT_VENDOR}") set(MACOSX_BUNDLE_COPYRIGHT "${PROJECT_COPYRIGHT_YEAR} ${PROJECT_VENDOR}")
set(MACOSX_BUNDLE_GUI_IDENTIFIER "${PROJECT_DOMAIN_SECOND}.${PROJECT_DOMAIN_FIRST}") set(MACOSX_BUNDLE_GUI_IDENTIFIER "${PROJECT_DOMAIN_SECOND}.${PROJECT_DOMAIN_FIRST}")
set(MACOSX_BUNDLE_BUNDLE_NAME ${EXECUTEABLE}) set(MACOSX_BUNDLE_BUNDLE_NAME ${EXECUTABLE})
set(MACOSX_BUNDLE_ICON_FILE third) set(MACOSX_BUNDLE_ICON_FILE third)
include(BundleUtilities) include(BundleUtilities)
add_executable(${EXECUTEABLE} MACOSX_BUNDLE third.icns Main.ui ${SRC_LIST} ${HEADERS}) add_executable(${EXECUTABLE} MACOSX_BUNDLE third.icns Main.ui ${SRC_LIST} ${HEADERS})
set_target_properties(${EXECUTEABLE} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/EthereumMacOSXBundleInfo.plist.in") set_target_properties(${EXECUTABLE} PROPERTIES MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/EthereumMacOSXBundleInfo.plist.in")
SET_SOURCE_FILES_PROPERTIES(${EXECUTEABLE} PROPERTIES MACOSX_PACKAGE_LOCATION MacOS) SET_SOURCE_FILES_PROPERTIES(${EXECUTABLE} PROPERTIES MACOSX_PACKAGE_LOCATION MacOS)
SET_SOURCE_FILES_PROPERTIES(${MACOSX_BUNDLE_ICON_FILE}.icns PROPERTIES MACOSX_PACKAGE_LOCATION "Resources") SET_SOURCE_FILES_PROPERTIES(${MACOSX_BUNDLE_ICON_FILE}.icns PROPERTIES MACOSX_PACKAGE_LOCATION "Resources")
else () else ()
set(EXECUTEABLE third) set(EXECUTABLE third)
add_executable(${EXECUTEABLE} Main.ui ${SRC_LIST} ${HEADERS}) add_executable(${EXECUTABLE} Main.ui ${SRC_LIST} ${HEADERS})
endif () endif ()
qt5_use_modules(${EXECUTEABLE} Core)# Gui Widgets Network WebKit WebKitWidgets) target_link_libraries(${EXECUTABLE} Qt5::Core)
target_link_libraries(${EXECUTEABLE} webthree qethereum ethereum evm ethcore secp256k1 gmp serpent lll evmcore devcore web3jsonrpc jsqrc) target_link_libraries(${EXECUTABLE} webthree)
target_link_libraries(${EXECUTABLE} qethereum)
target_link_libraries(${EXECUTABLE} ethereum)
target_link_libraries(${EXECUTABLE} evm)
target_link_libraries(${EXECUTABLE} ethcore)
target_link_libraries(${EXECUTABLE} secp256k1)
target_link_libraries(${EXECUTABLE} serpent)
target_link_libraries(${EXECUTABLE} lll)
target_link_libraries(${EXECUTABLE} evmcore)
target_link_libraries(${EXECUTABLE} devcore)
target_link_libraries(${EXECUTABLE} web3jsonrpc)
target_link_libraries(${EXECUTABLE} jsqrc)
if (APPLE) if (APPLE)
# First have qt5 install plugins and frameworks # First have qt5 install plugins and frameworks
add_custom_command(TARGET ${EXECUTEABLE} POST_BUILD add_custom_command(TARGET ${EXECUTABLE} POST_BUILD
COMMAND ${CMAKE_PREFIX_PATH}/bin/macdeployqt ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${EXECUTEABLE}.app COMMAND ${CMAKE_DEPENDENCY_INSTALL_DIR}/bin/macdeployqt ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/${EXECUTABLE}.app
WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}) WORKING_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY})
# This tool and next will inspect linked libraries in order to determine which dependencies are required # This tool and next will inspect linked libraries in order to determine which dependencies are required
if (${CMAKE_CFG_INTDIR} STREQUAL ".") if (${CMAKE_CFG_INTDIR} STREQUAL ".")
set(APP_BUNDLE_PATH "${CMAKE_CURRENT_BINARY_DIR}/${EXECUTEABLE}.app") set(APP_BUNDLE_PATH "${CMAKE_CURRENT_BINARY_DIR}/${EXECUTABLE}.app")
else () else ()
set(APP_BUNDLE_PATH "${CMAKE_CURRENT_BINARY_DIR}/\$ENV{CONFIGURATION}/${EXECUTEABLE}.app") set(APP_BUNDLE_PATH "${CMAKE_CURRENT_BINARY_DIR}/\$ENV{CONFIGURATION}/${EXECUTABLE}.app")
endif () endif ()
install(CODE " install(CODE "
include(BundleUtilities) include(BundleUtilities)
@ -72,23 +78,7 @@ if (APPLE)
file(REMOVE \${LINGER_RM}) file(REMOVE \${LINGER_RM})
endif () 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 opengl32 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} crypt32)
target_link_libraries(${EXECUTEABLE} Qt5PlatformSupport)
set(CMAKE_SHARED_LIBRARY_LINK_CXX_FLAGS)
elseif (UNIX)
else () else ()
target_link_libraries(${EXECUTEABLE} boost_system) install( TARGETS ${EXECUTABLE} RUNTIME DESTINATION bin)
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 () endif ()

Loading…
Cancel
Save