Fix build with c++utilities change to add header for compile definitions

* Add include directory for testhelper library manually as using the
  imported target was not possibly
* Fix visibility when using libsyncthing in syncthingwidgets
* Update changed global headers along the way
This commit is contained in:
Martchus 2024-01-30 22:35:47 +01:00
parent 577b814b71
commit 0f1bcae534
10 changed files with 12 additions and 1 deletions

View File

@ -31,6 +31,7 @@ use_syncthingconnector()
# find libraries used by tests
find_package(syncthingtesthelper ${META_APP_VERSION} REQUIRED)
list(APPEND TEST_LIBRARIES ${SYNCTHINGTESTHELPER_LIB})
list(APPEND PRIVATE_INCLUDE_DIRS "${CMAKE_CURRENT_BINARY_DIR}/../testhelper/include")
use_standard_filesystem(LIBRARIES_VARIABLE "TEST_LIBRARIES" PACKAGES_VARIABLE "TEST_PACKAGES" OPTIONAL)
# include modules to apply configuration

View File

@ -4,6 +4,7 @@
#ifndef SYNCTHINGFILEITEMACTION_GLOBAL
#define SYNCTHINGFILEITEMACTION_GLOBAL
#include "syncthingfileitemaction-devel-definitions.h"
#include <c++utilities/application/global.h>
#ifdef SYNCTHINGFILEITEMACTION_STATIC

View File

@ -4,6 +4,7 @@
#ifndef SYNCTHINGPLASMOID_GLOBAL
#define SYNCTHINGPLASMOID_GLOBAL
#include "syncthingplasmoid-devel-definitions.h"
#include <c++utilities/application/global.h>
#ifdef SYNCTHINGPLASMOID_STATIC

View File

@ -4,6 +4,7 @@
#ifndef LIB_SYNCTHING_GLOBAL
#define LIB_SYNCTHING_GLOBAL
#include "syncthing-devel-definitions.h"
#include <c++utilities/application/global.h>
#ifdef LIB_SYNCTHING_STATIC

View File

@ -142,6 +142,7 @@ include(LibraryTarget)
# link tests against test helper (can't use find_package because testhelper target is not present at this point)
list(APPEND TEST_LIBRARIES syncthingtesthelper)
list(APPEND PRIVATE_INCLUDE_DIRS "${CMAKE_CURRENT_BINARY_DIR}/../testhelper/include")
include(TestTarget)
# avoid running this test in parallel with other tests spawning a Syncthing test instance

View File

@ -4,6 +4,7 @@
#ifndef LIB_SYNCTHING_CONNECTOR_GLOBAL
#define LIB_SYNCTHING_CONNECTOR_GLOBAL
#include "syncthingconnector-devel-definitions.h"
#include <c++utilities/application/global.h>
#ifdef LIB_SYNCTHING_CONNECTOR_STATIC

View File

@ -4,6 +4,7 @@
#ifndef LIB_SYNCTHING_MODEL_GLOBAL
#define LIB_SYNCTHING_MODEL_GLOBAL
#include "syncthingmodel-devel-definitions.h"
#include <c++utilities/application/global.h>
#ifdef LIB_SYNCTHING_MODEL_STATIC

View File

@ -99,12 +99,14 @@ find_package(syncthingconnector ${META_APP_VERSION} REQUIRED)
use_syncthingconnector(VISIBILITY PUBLIC)
find_package(syncthingmodel ${META_APP_VERSION} REQUIRED)
use_syncthingmodel(VISIBILITY PUBLIC)
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 (USE_LIBSYNCTHING)
find_package(syncthing ${META_APP_VERSION} REQUIRED)
use_syncthing()
use_syncthing(VISIBILITY PUBLIC)
list(APPEND META_PUBLIC_COMPILE_DEFINITIONS SYNCTHINGWIDGETS_USE_LIBSYNCTHING)
endif ()

View File

@ -4,6 +4,7 @@
#ifndef SYNCTHINGWIDGETS_GLOBAL
#define SYNCTHINGWIDGETS_GLOBAL
#include "syncthingwidgets-devel-definitions.h"
#include <c++utilities/application/global.h>
#ifdef SYNCTHINGWIDGETS_STATIC

View File

@ -4,6 +4,7 @@
#ifndef SYNCTHINGTESTHELPER_GLOBAL
#define SYNCTHINGTESTHELPER_GLOBAL
#include "syncthingtesthelper-definitions.h"
#include <c++utilities/application/global.h>
#ifdef SYNCTHINGTESTHELPER_STATIC