Commit Graph

75 Commits

Author SHA1 Message Date
Martchus dfbf300c65 Expose name of default desktop file via config header 2024-04-08 12:33:40 +02:00
Martchus a43affa81a Avoid `global.h` changing depending on target prefix/suffix
Just using the project name should be sufficient and this avoid `global.h`
from changing when a different target prefix/suffix is used.
2024-02-22 19:41:15 +01:00
Martchus a7fdc1af1b Allow writing public compile definitions to a header file
This is useful as it makes consuming libraries less dependent on using the
CMake module or pkg-config file correctly. This should especially decrease
the likelihood of running into linker errors when consuming a static build
of the libraries where e.g. `CPP_UTILITIES_STATIC` needs to be defined.
2024-01-30 22:13:25 +01:00
Martchus 762131acf9 Fix AppStream validation tests 2023-11-14 02:14:26 +01:00
Martchus 18d92fee40 Fix typo in CLI wrapper code 2023-08-18 22:55:42 +02:00
Martchus 30cefc2fd3 Add version details to config header 2023-06-17 22:53:48 +02:00
Martchus a19ee41a39 Apply cmake-format and clang-format 2023-05-16 21:39:10 +02:00
Martchus 0d0685d4c7 Simplify workaround for starting console and CLI-wrapper
* Disable workaround by default; with the CLI-wrapper available it makes no
  sense to run this code unnecassarily when the main executable is invoked
    * Remove check for Mintty; with the workaround disabled by default it
      is no longer necassary to avoid it
* Simplify the CLI-wrapper to rely on main application for enabling UTF-8
  and virtual terminal processing as it relies on it for attaching to the
  parent's console anyways
2023-05-09 00:16:28 +02:00
Martchus f3cb406ebe Add CLI-wrapper for Windows
Starting the console from a GUI application is not working very
well - so let's just provide a 2nd executable for the CLI. It
will be a simple console application that merely invokes the main
application passing all standard I/O. Unfortunately this does not
mean the existing hacks can be removed. Without them the wrapper
still doesn't get any I/O from the GUI application.
2023-05-07 21:32:21 +02:00
Martchus d05677e3b5 Prevent AppStream validation error `asv-release-time-missing`
* Avoid hard-coding and additional steps in the release workflow by simply
  considering the day of the last modification the release date
* See https://github.com/Martchus/syncthingtray/issues/158
2022-10-11 21:00:16 +02:00
Martchus da431580d4 Prevent AppStream validation error `asv-cid-desktopapp-is-not-rdns`
See https://github.com/Martchus/syncthingtray/issues/158
2022-10-11 20:58:21 +02:00
Hannah Rittich b8eee6d9d6 Fix namespace for file names 2021-10-03 02:13:27 +02:00
Hannah Rittich 3730830880 Added namespace for file names 2021-10-02 21:08:10 +02:00
Martchus 030e6a2034 Source required packages before adding target
The config script for adding the target (which is generated
by CMake) otherwise complains that referenced dependencies
are missing. Not sure why this was never a problem. Maybe
the packages were just present anyways or CMake added
additional checks at some point.
2021-09-16 01:06:35 +02:00
Martchus 1b6ffb561a Fix locating files which are directly under the data dir (and not in the cmake dir) 2021-08-25 19:38:43 +02:00
Martchus 9fb3bbe179 Export a target for using only headers of a library
Some backend libraries of Syncthing Tray and Reflective RapidJSON only use
certain headers of qtutilities/c++utilities. The current solution did not
really work because it did not distinguish between the build and install
interface and also did not take compile definitions and options into
account.
2021-01-01 18:42:22 +01:00
Martchus 7ad2a9818d Support target suffix when generating the dependency list for the config header 2021-01-01 18:34:43 +01:00
Martchus 80d2823915 Add PROJECT_CONFIG_SUFFIX to the config header 2020-12-14 20:57:05 +01:00
Martchus 534aaf0b4d Fix 'OriginalFilename' in Windows RC file
Rely on generator expressions to get the correct filename. This has never
worked because WINDOWS_EXT was usually only set after WindowsResources has
been included.
2020-07-04 15:21:20 +02:00
Martchus b03332f37a Add "SOVERSION" as suffix to shared libraries for mingw-w64 targets
* Also enable the "lib" prefix which CMake would add by default again; it
  has only been removed to preserve compatibility with qmake when switching
  from qmake to CMake
* None of these changes are enabled by default to preserve compatibility
2020-07-04 14:43:26 +02:00
Martchus 63b5fb9c14 Add PROJECT_VARNAME and PROJECT_VARNAME_UPPER to config header 2020-06-23 02:06:29 +02:00
Martchus f9bd0b5987 Don't use @META_CONFIG_SUFFIX@ in APP_SPECIFIC_QT_TRANSLATION_FILES
See a40d2974e0
2019-08-09 23:20:10 +02:00
Martchus eb34ce610d Add domain to ApplicationInfo 2019-07-20 20:57:56 +02:00
Martchus fc9e1ff703 Add version header to libraries 2019-06-16 15:33:10 +02:00
Martchus fd531bdd6a Prefix most of the macros in global.h 2019-06-12 20:34:25 +02:00
Martchus e120a897c5 Add use_package to 3rdParty 2019-05-30 14:04:04 +02:00
Martchus 01f21e63c9 Fix appdata.xml.in 2019-05-19 14:14:25 +02:00
Martchus e114b24d3c Add helper to use pkg-config modules
This basically creates imported targets from those
pkg-config modules. It also supports static linkage.

The main effort here is that those imported targets
are also exported appropriately. This is implemented
by letting the config script re-run pkg-config as
required.
2019-05-09 19:27:10 +02:00
Martchus 0443905986 Fix creation of desktop files 2019-05-05 23:19:05 +02:00
Martchus 02bd9f7c06 Add new fields to ApplicationInfo 2019-05-05 18:35:40 +02:00
Martchus fa961b21bc Adapt translatin search path to new config feature 2019-05-05 18:35:13 +02:00
Martchus 1480d9ab63 Support installing multiple configurations within the same prefix 2019-05-04 01:59:45 +02:00
Martchus 8ffe0e6a51 Polish CMake code 2019-04-22 22:19:08 +02:00
Martchus e9cc26478b Don't mix building static and shared libraries 2019-04-22 20:42:48 +02:00
Martchus 6088f6bb43 Don't include Qt-specific config in config.h 2019-04-13 20:33:39 +02:00
Martchus 9e8ec0fcd5 Split Qt-specific config from other config
So adding Qt-specific config does not require a change
in c++utilities anymore.
2018-03-07 18:23:51 +01:00
Martchus d684e20bfc Add launchable to appdata.xml 2018-02-22 00:01:01 +01:00
Martchus 7c8580d579 Add license to config 2018-02-21 22:14:22 +01:00
Martchus e57e79f9c9 Stringify meta data in template 2018-02-21 22:07:05 +01:00
Martchus 989d1d20c8 Allow using templated appdata body 2018-02-21 21:55:52 +01:00
Martchus 486a09c1c5 Add basic template for meta info 2018-02-18 20:18:00 +01:00
Martchus 3fcbaf7fff Split shared and static configuration 2018-02-16 23:56:29 +01:00
Martchus 60a762f514 Allow configuring static Qt Widget style plugins
Required since the platform styles have been
pluginized in Qt 5.10

See 4f3249f32d
2017-12-15 20:18:17 +01:00
Martchus 684e97ce2a Allow customizing the config header file
by setting the 'META_CUSTOM_CONFIG' variable
2017-11-17 20:36:34 +01:00
Martchus 6df6474840 Allow configuring supported image formats
This allows to add an option for linking against static Qt
image format plugins in qtutilities.
2017-09-03 17:53:20 +02:00
Martchus 032111eef0 Distinguish exporting/enabling resources of static libs
Required because we now allow to provide dynamic libs as
dependencies of static libs
2017-08-31 02:15:46 +02:00
Martchus b45fe7eaeb Allow providing a shared lib as dependency for a static lib
Previously the case when the dependency of a static library
was provided by a dynamic library has not been handled
correctly leading to linker errors when building the final
application.
2017-08-06 00:35:11 +02:00
Martchus 942c14ce3d Fix target include dirs
* Add include path of own header files for build
  and external use via imported target. Previously
  only include dirs required for external libs were
  added.
* Using global include dirs is no longer required.
* When PUBLIC_SHARED_INCLUDE_DIRS is empty, adding
  "${PUBLIC_SHARED_INCLUDE_DIRS}" to public include dirs
  does not leave INTERFACE_INCLUDE_DIRECTORIES property
  empty. Instead the source dir is added. So just don't
  use quotes here.
2017-07-11 22:02:27 +02:00
Martchus 8799698f01 Adapt global.h.in to new coding style 2017-05-01 02:57:58 +02:00
Martchus be03e5ad4c Provide meta-data in CMake config 2017-04-15 22:39:41 +02:00