Skip to content

Commit dcb8ec0

Browse files
committed
cmake: add option to skip compilation of optional monero binaries
1 parent ed9ea9c commit dcb8ec0

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

CMakeLists.txt

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ option(WITH_DESKTOP_ENTRY "Ask to install desktop entry on first startup" ON)
1818
option(WITH_UPDATER "Regularly check for new updates" ON)
1919
option(DEV_MODE "Checkout latest monero master on build" OFF)
2020
cmake_dependent_option(QML_TESTS "Build QML tests" ON "NOT STATIC;NOT ANDROID;NOT IOS" OFF)
21+
option(SKIP_OPTIONAL_MONERO_BINARIES "Don't build optional monero binaries" ON)
2122

2223
if(DEV_MODE)
2324
# DEV_MODE checks out the monero submodule to master, which requires C++17.
@@ -64,6 +65,28 @@ if(NOT MANUAL_SUBMODULES)
6465
endif()
6566

6667
add_subdirectory(monero)
68+
69+
if(SKIP_OPTIONAL_MONERO_BINARIES)
70+
foreach(_optional_monero_target
71+
simplewallet
72+
gen_multisig
73+
gen_ssl_cert
74+
wallet_rpc_server
75+
blockchain_import
76+
blockchain_export
77+
blockchain_blackball
78+
blockchain_usage
79+
blockchain_ancestry
80+
blockchain_depth
81+
blockchain_stats
82+
blockchain_prune_known_spent_data
83+
blockchain_prune)
84+
if(TARGET ${_optional_monero_target})
85+
set_target_properties(${_optional_monero_target} PROPERTIES EXCLUDE_FROM_ALL TRUE)
86+
endif()
87+
endforeach()
88+
endif()
89+
6790
add_subdirectory(external)
6891

6992
set(CMAKE_AUTOMOC ON)

0 commit comments

Comments
 (0)