Skip to content

Commit

Permalink
Enable libsyncthing by default on mobile platforms
Browse files Browse the repository at this point in the history
* Users are likely most likely not running Syncthing outside the app on
  mobile platforms.
* Also use libsyncthing by default when it is being built so this is
  actually effectively enabling support for libsyncthing.
  • Loading branch information
Martchus committed Oct 27, 2024
1 parent ac425f3 commit 9b409f7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,13 @@ set(NETWORK_INFORMATION_SUPPORT ON)
project(${META_PROJECT_NAME})
enable_testing()

# disable experimental Qt Quick GUI by default except on mobile platforms
# disable experimental Qt Quick GUI by default except on mobile platforms, enable libsyncthing by default
if (ANDROID OR IOS)
set(QUICK_GUI_ENABLED_BY_DEFAULT ON)
set(LIBSYNCTHING_DISABLED_BY_DEFAULT OFF)
else ()
set(QUICK_GUI_ENABLED_BY_DEFAULT OFF)
set(LIBSYNCTHING_DISABLED_BY_DEFAULT ON)
endif ()

# disable KDE integration under Android, Windows and MacOS by default
Expand Down Expand Up @@ -54,7 +56,7 @@ if (KF_PACKAGE_PREFIX MATCHES ".*KF([0-9]+).*")
endif ()

# add options for partial build
option(NO_LIBSYNCTHING "whether building Syncthing itself as a library should be skipped" ON)
option(NO_LIBSYNCTHING "whether building Syncthing itself as a library should be skipped" "${LIBSYNCTHING_DISABLED_BY_DEFAULT}")
option(NO_CLI "whether building CLI should be skipped" OFF)
option(NO_TRAY "whether building the tray should be skipped" OFF)
option(NO_FILE_ITEM_ACTION_PLUGIN "whether building the file item action plugin should be skipped" "${FILE_ITEM_ACTION_PLUGIN_DISABLED_BY_DEFAULT}")
Expand Down
7 changes: 6 additions & 1 deletion syncthingwidgets/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,12 @@ find_package(syncthingtesthelper ${META_APP_VERSION} REQUIRED)
list(APPEND PRIVATE_INCLUDE_DIRS "${CMAKE_CURRENT_BINARY_DIR}/../testhelper/include")

# configure libsyncthing
option(USE_LIBSYNCTHING "whether libsyncthing should be included for the launcher" OFF)
if (NO_LIBSYNCTHING)
set(USE_LIBSYNCTHING_DEFAULT OFF)
else ()
set(USE_LIBSYNCTHING_DEFAULT ON)
endif ()
option(USE_LIBSYNCTHING "whether libsyncthing should be included for the launcher" ${USE_LIBSYNCTHING_DEFAULT})
if (USE_LIBSYNCTHING)
find_package(syncthing ${META_APP_VERSION} REQUIRED)
use_syncthing(VISIBILITY PUBLIC)
Expand Down

0 comments on commit 9b409f7

Please sign in to comment.