Browse Source

Remove obsolated CMake options.

cl-refactor
Paweł Bylica 9 years ago
parent
commit
a885ab05e3
  1. 18
      CMakeLists.txt
  2. 30
      cmake/EthDependencies.cmake
  3. 11
      libjsqrc/CMakeLists.txt

18
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 # which lets us keep the default values of all build options and is set at
# the beginning of this file. # 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: #defaults:
set(D_CMAKE_BUILD_TYPE "Release") set(D_CMAKE_BUILD_TYPE "Release")
set(D_SERPENT ${DECENT_PLATFORM})
set(D_USENPM OFF) set(D_USENPM OFF)
set(D_GUI ON) set(D_GUI ON)
set(D_TOOLS ON) set(D_TOOLS ON)
@ -61,47 +53,40 @@ set(D_MINER ON)
set(D_ETHSTRATUM OFF) set(D_ETHSTRATUM OFF)
if (BUNDLE STREQUAL "minimal") if (BUNDLE STREQUAL "minimal")
set(D_SERPENT OFF)
set(D_USENPM OFF) set(D_USENPM OFF)
set(D_GUI OFF) set(D_GUI OFF)
set(D_TOOLS ON) set(D_TOOLS ON)
set(D_TESTS OFF) set(D_TESTS OFF)
elseif (BUNDLE STREQUAL "full") elseif (BUNDLE STREQUAL "full")
set(D_SERPENT ${DECENT_PLATFORM})
set(D_USENPM ON) set(D_USENPM ON)
set(D_GUI ON) set(D_GUI ON)
set(D_TOOLS ON) set(D_TOOLS ON)
set(D_TESTS ON) set(D_TESTS ON)
set(D_FATDB ON) set(D_FATDB ON)
elseif (BUNDLE STREQUAL "cli") elseif (BUNDLE STREQUAL "cli")
set(D_SERPENT ${DECENT_PLATFORM})
set(D_USENPM ON) set(D_USENPM ON)
set(D_GUI OFF) set(D_GUI OFF)
set(D_TOOLS ON) set(D_TOOLS ON)
set(D_TESTS ON) set(D_TESTS ON)
set(D_FATDB ON) set(D_FATDB ON)
elseif (BUNDLE STREQUAL "core") elseif (BUNDLE STREQUAL "core")
set(D_SERPENT OFF)
set(D_USENPM OFF) set(D_USENPM OFF)
set(D_GUI ON) set(D_GUI ON)
set(D_TOOLS ON) set(D_TOOLS ON)
set(D_TESTS OFF) set(D_TESTS OFF)
set(D_FATDB ON) set(D_FATDB ON)
elseif (BUNDLE STREQUAL "tests") elseif (BUNDLE STREQUAL "tests")
set(D_SERPENT ${DECENT_PLATFORM})
set(D_USENPM OFF) set(D_USENPM OFF)
set(D_GUI OFF) set(D_GUI OFF)
set(D_TOOLS OFF) set(D_TOOLS OFF)
set(D_TESTS ON) set(D_TESTS ON)
set(D_FATDB ON) set(D_FATDB ON)
elseif (BUNDLE STREQUAL "user") elseif (BUNDLE STREQUAL "user")
set(D_SERPENT OFF)
set(D_USENPM OFF) set(D_USENPM OFF)
set(D_GUI ON) set(D_GUI ON)
set(D_TOOLS ON) set(D_TOOLS ON)
set(D_TESTS OFF) set(D_TESTS OFF)
elseif (BUNDLE STREQUAL "wallet") elseif (BUNDLE STREQUAL "wallet")
set(D_SERPENT OFF)
set(D_USENPM OFF) set(D_USENPM OFF)
set(D_GUI OFF) set(D_GUI OFF)
set(D_TOOLS OFF) set(D_TOOLS OFF)
@ -111,7 +96,6 @@ elseif (BUNDLE STREQUAL "wallet")
set(D_FATDB OFF) set(D_FATDB OFF)
set(D_JSONRPC OFF) set(D_JSONRPC OFF)
elseif (BUNDLE STREQUAL "miner") elseif (BUNDLE STREQUAL "miner")
set(D_SERPENT OFF)
set(D_USENPM OFF) set(D_USENPM OFF)
set(D_GUI OFF) set(D_GUI OFF)
set(D_TOOLS OFF) set(D_TOOLS OFF)
@ -122,7 +106,6 @@ elseif (BUNDLE STREQUAL "miner")
set(D_JSONRPC ON) set(D_JSONRPC ON)
set(D_ETHSTRATUM ON) set(D_ETHSTRATUM ON)
elseif (BUNDLE STREQUAL "cudaminer") elseif (BUNDLE STREQUAL "cudaminer")
set(D_SERPENT OFF)
set(D_USENPM OFF) set(D_USENPM OFF)
set(D_GUI OFF) set(D_GUI OFF)
set(D_TOOLS OFF) set(D_TOOLS OFF)
@ -134,7 +117,6 @@ elseif (BUNDLE STREQUAL "cudaminer")
set(D_JSONRPC ON) set(D_JSONRPC ON)
set(D_ETHSTRATUM ON) set(D_ETHSTRATUM ON)
elseif (BUNDLE STREQUAL "release") # release builds elseif (BUNDLE STREQUAL "release") # release builds
set(D_SERPENT ${DECENT_PLATFORM})
set(D_USENPM OFF) set(D_USENPM OFF)
set(D_GUI ON) set(D_GUI ON)
set(D_TOOLS ON) set(D_TOOLS ON)

30
cmake/EthDependencies.cmake

@ -11,7 +11,7 @@ else ()
endif() endif()
set (CMAKE_PREFIX_PATH ${ETH_DEPENDENCY_INSTALL_DIR}) 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 # 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") set(ETH_GENERATED_DIR "${PROJECT_BINARY_DIR}/gen")
include_directories(${ETH_GENERATED_DIR}) include_directories(${ETH_GENERATED_DIR})
@ -75,7 +75,7 @@ if (JSONRPC)
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)
find_package(MHD) find_package(MHD)
message(" - microhttpd header: ${MHD_INCLUDE_DIRS}") message(" - microhttpd header: ${MHD_INCLUDE_DIRS}")
message(" - microhttpd lib : ${MHD_LIBRARIES}") message(" - microhttpd lib : ${MHD_LIBRARIES}")
message(" - microhttpd dll : ${MHD_DLLS}") message(" - microhttpd dll : ${MHD_DLLS}")
@ -177,25 +177,6 @@ if (GUI)
message(" - appdmg location : ${ETH_APP_DMG}") message(" - appdmg location : ${ETH_APP_DMG}")
endif() 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 endif() #GUI
# use multithreaded boost libraries, with -mt suffix # 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 # 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()
@ -228,4 +209,3 @@ if (APPLE)
link_directories(/usr/local/lib) link_directories(/usr/local/lib)
include_directories(/usr/local/include) include_directories(/usr/local/include)
endif() endif()

11
libjsqrc/CMakeLists.txt

@ -12,18 +12,7 @@ qt5_add_resources(JSQRC js.qrc)
add_library(jsqrc STATIC ${JSQRC}) add_library(jsqrc STATIC ${JSQRC})
target_link_libraries(jsqrc Qt5::Core) 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 ) install( TARGETS jsqrc RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib )
file(GLOB_RECURSE JSFILES "ethereumjs/lib/*.js") file(GLOB_RECURSE JSFILES "ethereumjs/lib/*.js")
add_custom_target(aux_js SOURCES ${JSFILES}) add_custom_target(aux_js SOURCES ${JSFILES})

Loading…
Cancel
Save