diff --git a/CMakeLists.txt b/CMakeLists.txt index a78f93141..acb151ce8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -34,16 +34,8 @@ list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") # which lets us keep the default values of all build options and is set at # the beginning of this file. -# TODO: Abstract into something sensible and move into a function. -if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") - set(DECENT_PLATFORM OFF) -else () - set(DECENT_PLATFORM ON) -endif () - #defaults: set(D_CMAKE_BUILD_TYPE "Release") -set(D_SERPENT ${DECENT_PLATFORM}) set(D_USENPM OFF) set(D_GUI ON) set(D_TOOLS ON) @@ -61,47 +53,40 @@ set(D_MINER ON) set(D_ETHSTRATUM OFF) if (BUNDLE STREQUAL "minimal") - set(D_SERPENT OFF) set(D_USENPM OFF) set(D_GUI OFF) set(D_TOOLS ON) set(D_TESTS OFF) elseif (BUNDLE STREQUAL "full") - set(D_SERPENT ${DECENT_PLATFORM}) set(D_USENPM ON) set(D_GUI ON) set(D_TOOLS ON) set(D_TESTS ON) set(D_FATDB ON) elseif (BUNDLE STREQUAL "cli") - set(D_SERPENT ${DECENT_PLATFORM}) set(D_USENPM ON) set(D_GUI OFF) set(D_TOOLS ON) set(D_TESTS ON) set(D_FATDB ON) elseif (BUNDLE STREQUAL "core") - set(D_SERPENT OFF) set(D_USENPM OFF) set(D_GUI ON) set(D_TOOLS ON) set(D_TESTS OFF) set(D_FATDB ON) elseif (BUNDLE STREQUAL "tests") - set(D_SERPENT ${DECENT_PLATFORM}) set(D_USENPM OFF) set(D_GUI OFF) set(D_TOOLS OFF) set(D_TESTS ON) set(D_FATDB ON) elseif (BUNDLE STREQUAL "user") - set(D_SERPENT OFF) set(D_USENPM OFF) set(D_GUI ON) set(D_TOOLS ON) set(D_TESTS OFF) elseif (BUNDLE STREQUAL "wallet") - set(D_SERPENT OFF) set(D_USENPM OFF) set(D_GUI OFF) set(D_TOOLS OFF) @@ -111,7 +96,6 @@ elseif (BUNDLE STREQUAL "wallet") set(D_FATDB OFF) set(D_JSONRPC OFF) elseif (BUNDLE STREQUAL "miner") - set(D_SERPENT OFF) set(D_USENPM OFF) set(D_GUI OFF) set(D_TOOLS OFF) @@ -122,7 +106,6 @@ elseif (BUNDLE STREQUAL "miner") set(D_JSONRPC ON) set(D_ETHSTRATUM ON) elseif (BUNDLE STREQUAL "cudaminer") - set(D_SERPENT OFF) set(D_USENPM OFF) set(D_GUI OFF) set(D_TOOLS OFF) @@ -134,7 +117,6 @@ elseif (BUNDLE STREQUAL "cudaminer") set(D_JSONRPC ON) set(D_ETHSTRATUM ON) elseif (BUNDLE STREQUAL "release") # release builds - set(D_SERPENT ${DECENT_PLATFORM}) set(D_USENPM OFF) set(D_GUI ON) set(D_TOOLS ON) diff --git a/cmake/EthDependencies.cmake b/cmake/EthDependencies.cmake index 10fd84a2b..eca4b1ba1 100644 --- a/cmake/EthDependencies.cmake +++ b/cmake/EthDependencies.cmake @@ -11,7 +11,7 @@ else () endif() set (CMAKE_PREFIX_PATH ${ETH_DEPENDENCY_INSTALL_DIR}) -# setup directory for cmake generated files and include it globally +# setup directory for cmake generated files and include it globally # it's not used yet, but if we have more generated files, consider moving them to ETH_GENERATED_DIR set(ETH_GENERATED_DIR "${PROJECT_BINARY_DIR}/gen") include_directories(${ETH_GENERATED_DIR}) @@ -75,7 +75,7 @@ if (JSONRPC) message (" - json-rpc-cpp lib : ${JSON_RPC_CPP_LIBRARIES}") add_definitions(-DETH_JSONRPC) - find_package(MHD) + find_package(MHD) message(" - microhttpd header: ${MHD_INCLUDE_DIRS}") message(" - microhttpd lib : ${MHD_LIBRARIES}") message(" - microhttpd dll : ${MHD_DLLS}") @@ -177,25 +177,6 @@ if (GUI) message(" - appdmg location : ${ETH_APP_DMG}") endif() - if (USENPM) - - # TODO check node && npm version - find_program(ETH_NODE node) - string(REGEX REPLACE "node" "" ETH_NODE_DIRECTORY ${ETH_NODE}) - message(" - nodejs location : ${ETH_NODE}") - - find_program(ETH_NPM npm) - string(REGEX REPLACE "npm" "" ETH_NPM_DIRECTORY ${ETH_NPM}) - message(" - npm location : ${ETH_NPM}") - - if (NOT ETH_NODE) - message(FATAL_ERROR "node not found!") - endif() - if (NOT ETH_NPM) - message(FATAL_ERROR "npm not found!") - endif() - endif() - endif() #GUI # use multithreaded boost libraries, with -mt suffix @@ -206,16 +187,16 @@ if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC") # TODO hanlde other msvc versions or it will fail find them set(Boost_COMPILER -vc120) # use static boost libraries *.lib - set(Boost_USE_STATIC_LIBS ON) + set(Boost_USE_STATIC_LIBS ON) elseif (APPLE) # use static boost libraries *.a - set(Boost_USE_STATIC_LIBS ON) + set(Boost_USE_STATIC_LIBS ON) elseif (UNIX) # use dynamic boost libraries .dll - set(Boost_USE_STATIC_LIBS OFF) + set(Boost_USE_STATIC_LIBS OFF) endif() @@ -228,4 +209,3 @@ if (APPLE) link_directories(/usr/local/lib) include_directories(/usr/local/include) endif() - diff --git a/libjsqrc/CMakeLists.txt b/libjsqrc/CMakeLists.txt index 4e849de12..d7d7797a2 100644 --- a/libjsqrc/CMakeLists.txt +++ b/libjsqrc/CMakeLists.txt @@ -12,18 +12,7 @@ qt5_add_resources(JSQRC js.qrc) add_library(jsqrc STATIC ${JSQRC}) target_link_libraries(jsqrc Qt5::Core) -if (USENPM) - add_custom_target(ethereumjs) - add_custom_command(TARGET ethereumjs - POST_BUILD - WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} - COMMAND bash compilejs.sh ${ETH_NPM_DIRECTORY} ${ETH_NODE_DIRECTORY} - ) - add_dependencies(jsqrc ethereumjs) -endif() - install( TARGETS jsqrc RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib ) file(GLOB_RECURSE JSFILES "ethereumjs/lib/*.js") add_custom_target(aux_js SOURCES ${JSFILES}) -