Cmake: add SELF_CONTAINED

This commit is contained in:
tobtoht 2022-02-25 20:48:14 +01:00
parent 2f4c4a7650
commit f816f44f4c
No known key found for this signature in database
GPG key ID: 1CADD27F41F45C3C
3 changed files with 9 additions and 0 deletions

View file

@ -10,6 +10,7 @@ set(VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_REVISION}")
option(STATIC "Link libraries statically, requires static Qt")
option(SELF_CONTAINED "Disable when building Feather for packages" OFF)
option(LOCALMONERO "Include LocalMonero module" ON)
option(XMRIG "Include XMRig module" ON)
option(TOR_BIN "Path to Tor binary to embed inside Feather" OFF)

View file

@ -144,6 +144,10 @@ if(WITH_SCANNER)
)
endif()
if(SELF_CONTAINED)
target_compile_definitions(feather PRIVATE SELF_CONTAINED=1)
endif()
if(DONATE_BEG)
target_compile_definitions(feather PRIVATE DONATE_BEG=1)
endif()

View file

@ -317,6 +317,10 @@ void MainWindow::initMenu() {
ui->actionCreateDesktopEntry->setDisabled(true);
#endif
#ifndef SELF_CONTAINED
ui->actionCreateDesktopEntry->setVisible(false);
#endif
// [Help]
connect(ui->actionAbout, &QAction::triggered, this, &MainWindow::menuAboutClicked);
connect(ui->actionOfficialWebsite, &QAction::triggered, [this](){Utils::externalLinkWarning(this, "https://featherwallet.org");});