generate sample node and rpc toml after building nano_node target (#2321)

install samples to root of installers, This allows for those on mac to not have to dig for the samples within the app
formatting
This commit is contained in:
Russel Waters 2019-10-01 13:43:45 -04:00 committed by GitHub
commit 6a8c2fa726
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 1 deletions

View file

@ -357,7 +357,7 @@ if (NANO_TEST OR RAIBLOCKS_TEST)
set (gtest_force_shared_crt ON)
else ()
set (gtest_force_shared_crt OFF)
endif()
endif()
add_subdirectory(nano/load_test)
@ -374,6 +374,8 @@ endif()
endif ()
if (NANO_GUI OR RAIBLOCKS_GUI)
install (FILES ${PROJECT_BINARY_DIR}/config-node.toml.sample DESTINATION .)
install (FILES ${PROJECT_BINARY_DIR}/config-rpc.toml.sample DESTINATION .)
if (WIN32)
set (PLATFORM_QT_PACKAGES WinExtras)
else ()

View file

@ -27,6 +27,11 @@ set_target_properties (nano_node
COMPILE_FLAGS
"-DQT_NO_KEYWORDS -DBOOST_ASIO_HAS_STD_ARRAY=1")
add_custom_command(TARGET nano_node
POST_BUILD
COMMAND nano_node --generate_config node > ${PROJECT_BINARY_DIR}/config-node.toml.sample
COMMAND nano_node --generate_config rpc > ${PROJECT_BINARY_DIR}/config-rpc.toml.sample)
if ((NANO_GUI OR RAIBLOCKS_GUI) AND NOT APPLE)
install(TARGETS nano_node
RUNTIME DESTINATION .