Graphene Updates and DApp Support #643

Closed
nathanielhourt wants to merge 84 commits from dapp-support into develop
6 changed files with 49 additions and 14 deletions
Showing only changes of commit 082df7ab4a - Show all commits

View file

@ -10,6 +10,9 @@ set( CUSTOM_URL_SCHEME "gcs" )
set( INSTALLER_APP_ID "68ad7005-8eee-49c9-95ce-9eed97e5b347" )
set( CMAKE_CXX_STANDARD 14 )
set( GRAPHENE_BUILD_DYNAMIC_LIBRARIES OFF CACHE BOOL
"Whether to build dynamic libraries instead of static. Applies only to chain, db, protocol, net, and utilities" )
# http://stackoverflow.com/a/18369825
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 4.8)
@ -162,8 +165,7 @@ endif()
add_subdirectory( libraries )
set(BUILD_BITSHARES_PROGRAMS TRUE CACHE BOOL "Build bitshares executables (witness node, cli wallet, etc)")
set(BUILD_PEERPLAYS_PROGRAMS TRUE CACHE BOOL "Build peerplays executables (witness node, cli wallet, etc)")
add_subdirectory( programs )
set(BUILD_BITSHARES_TESTS TRUE CACHE BOOL "Build bitshares unit tests")

View file

@ -19,12 +19,16 @@ else( GRAPHENE_DISABLE_UNITY_BUILD )
message( STATUS "Graphene database unity build enabled" )
endif( GRAPHENE_DISABLE_UNITY_BUILD )
## SORT .cpp by most likely to change / break compile
add_library( graphene_chain
${CPP_FILES}
${HEADERS}
"${CMAKE_CURRENT_BINARY_DIR}/include/graphene/chain/hardfork.hpp"
)
set( GRAPHENE_CHAIN_FILES
${CPP_FILES}
${HEADERS}
"${CMAKE_CURRENT_BINARY_DIR}/include/graphene/chain/hardfork.hpp"
)
if (NOT ${GRAPHENE_BUILD_DYNAMIC_LIBRARIES})
add_library( graphene_chain ${GRAPHENE_CHAIN_FILES} )
else()
add_library( graphene_chain SHARED ${GRAPHENE_CHAIN_FILES} )
endif()
add_dependencies( graphene_chain build_hardfork_hpp )
target_link_libraries( graphene_chain fc graphene_db graphene_protocol )

View file

@ -1,5 +1,18 @@
file(GLOB HEADERS "include/graphene/db/*.hpp")
add_library( graphene_db undo_database.cpp index.cpp object_database.cpp ${HEADERS} )
set( GRAPHENE_DB_FILES
undo_database.cpp
index.cpp
object_database.cpp
${HEADERS}
)
if (NOT ${GRAPHENE_BUILD_DYNAMIC_LIBRARIES})
add_library( graphene_db ${GRAPHENE_DB_FILES} )
else()
add_library( graphene_db SHARED ${GRAPHENE_DB_FILES} )
endif()
target_link_libraries( graphene_db graphene_protocol fc )
target_include_directories( graphene_db PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" )

View file

@ -9,7 +9,11 @@ set(SOURCES node.cpp
message.cpp
message_oriented_connection.cpp)
add_library( graphene_net ${SOURCES} ${HEADERS} )
if (NOT ${GRAPHENE_BUILD_DYNAMIC_LIBRARIES})
add_library( graphene_net ${SOURCES} ${HEADERS} )
else()
add_library( graphene_net SHARED ${SOURCES} ${HEADERS} )
endif()
target_link_libraries( graphene_net
PUBLIC fc graphene_db graphene_protocol )

View file

@ -42,7 +42,12 @@ list(APPEND SOURCES account.cpp
)
add_library( graphene_protocol ${SOURCES} ${HEADERS} )
if (NOT ${GRAPHENE_BUILD_DYNAMIC_LIBRARIES})
add_library( graphene_protocol ${SOURCES} ${HEADERS} )
else()
add_library( graphene_protocol SHARED ${SOURCES} ${HEADERS} )
endif()
target_link_libraries( graphene_protocol fc )
target_include_directories( graphene_protocol PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" )

View file

@ -20,9 +20,16 @@ set(sources
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/git_revision.cpp.in" "${CMAKE_CURRENT_BINARY_DIR}/git_revision.cpp" @ONLY)
list(APPEND sources "${CMAKE_CURRENT_BINARY_DIR}/git_revision.cpp")
add_library( graphene_utilities
${sources}
${HEADERS} )
if (NOT ${GRAPHENE_BUILD_DYNAMIC_LIBRARIES})
add_library( graphene_utilities
${sources}
${HEADERS} )
else()
add_library( graphene_utilities SHARED
${sources}
${HEADERS} )
endif()
target_link_libraries( graphene_utilities fc )
target_include_directories( graphene_utilities
PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include" )