Martchus
7d6fc9721a
Apply clang-format/cmake-format
2023-02-03 13:31:18 +01:00
Martchus
b9b8bfc62a
Fix and improve code for finding CppUnit
...
* Remove `FORCE` in initialization of cache variables as this makes the
library/include dir effectively *not* configurable
* Try using `find_package()` as the vcpkg package provides a CMake module
2023-01-31 22:37:06 +01:00
Martchus
da830dcef5
Apply clang-format and cmake-format
2023-01-28 20:20:47 +01:00
Martchus
b6fa13f8dd
Use C++ 20 when compiling with MSVC as it requires it for designated initializers
2023-01-26 22:23:46 +01:00
Martchus
81618a3468
Expose package version via `use_package` function
2023-01-22 23:01:10 +01:00
Martchus
23ca57740b
Apply cmake-format
2022-12-24 23:15:47 +01:00
Martchus
c48816b243
Move CMake code for enabling warnings into separate module and function
2022-12-24 23:15:24 +01:00
Martchus
d9eb99fca1
Allow to keep CMake's CXX_STANDARD property empty
...
This can be useful to e.g. specify the standard manually or to just stick
to the compiler's default.
2022-12-23 20:52:00 +01:00
Martchus
1aba9f5f6f
Allow setting Windows/MacOS icon paths to avoid conversion
...
This makes it possible to have an own version of the icon for those
platforms instead of relying on an automatic conversion from the generic
PNG icon.
2022-12-22 23:28:05 +01:00
Martchus
913b6e7d65
Apply CMake format
2022-10-16 15:04:52 +02:00
Martchus
e502269d50
Run cmake-format on tests specified via `QT_TESTS` variable
2022-10-16 15:04:38 +02:00
Martchus
3f072549a6
Detect whether GPL license version is "-or-later" automatically
2022-10-13 00:03:04 +02:00
Martchus
aa31d441d7
Avoid guessing release data for AppStream file, rely on explicit meta-data
2022-10-12 22:55:56 +02:00
Martchus
804852b95e
Do not exclude appstream validation from checks as errors should be handled
2022-10-11 21:03:17 +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
Martchus
4a7a9ec32d
Add build system check to validate appstream files
...
* Exclude new tests from `check` target for now as they are currently
failing
* See https://github.com/Martchus/syncthingtray/issues/158
2022-10-11 19:25:17 +02:00
Martchus
faaa40100c
Allow using functions for adding desktop/appstream file independently
2022-10-08 21:55:24 +02:00
Martchus
353a74fa96
Avoid separating version parts with dots in DLL name
...
It looks better to not use dots here as a dot already separates the
extension.
2022-09-11 13:45:07 +02:00
Martchus
3a9a9c6f36
Apply cmake-format
2022-08-22 21:47:19 +02:00
Martchus
70e6ef4b7b
Avoid redundant definition of appstream file path
2022-08-22 21:47:08 +02:00
Martchus
9141fcdfd8
Skip creation of desktop/appstream files if not building with GUI support
2022-08-20 18:13:08 +02:00
Martchus
fea69428d1
Apply cmake-format
2022-08-11 23:29:37 +02:00
Martchus
aa4be0ef70
Fix build errors with CMake 3.24.0
...
See note in comment; concrete example of build error (when building
syncthingtray against qtforkawesome built with CMake 3.24.0):
```
CMake Error at plasmoid/lib/CMakeLists.txt:15 (find_package):
Found package configuration file:
/usr/share/qtquickforkawesome-git/cmake/qtquickforkawesome-gitConfig.cmake
but it set qtquickforkawesome-git_FOUND to FALSE so package
"qtquickforkawesome-git" is considered to be NOT FOUND. Reason given by
package:
The following imported targets are referenced, but are missing:
qtforkawesome-git
```
2022-08-09 20:51:42 +02:00
Martchus
c1e93738b6
Fix condition for avoiding `-static` flag
...
There's no `LINUX`; I suppose `UNIX` is specific enough as well.
2022-04-05 22:10:16 +02:00
Martchus
58c3506ca0
Add opt-out for enforcing static linkage (when generally aiming for static linkage)
2022-04-03 00:51:33 +02:00
Martchus
28a35e9673
Remove project name from headers dir if it already starts with it
...
This is useful if the repo contains headers in a directory called like the
project itself and should not have any effect on other projects.
2022-03-22 22:02:50 +01:00
Martchus
f20ea87f32
Fix using arguments in `configure_test_target`
2021-11-02 17:49:28 +01:00
Martchus
9cbff29c9e
Fix passing application path when invoking tests
...
We need to pass the application's path here; not the path of the test
itself.
2021-11-02 17:48:09 +01:00
Martchus
11574209b3
Add experimental support for generating coverage report via gcc/gcov/lcov
2021-11-01 18:20:51 +01:00
Martchus
37c2b920d0
Remove obsolete check when configuring coverage with Clang
...
Building shared and static libraries at the same time has been removed as
of version 5 so this message would never be printed and it is not clear
anymore what the actual problem was.
2021-11-01 14:10:22 +01:00
Martchus
5563776061
Expose test name (created via `TestTarget.cmake`) for fixing downstream bug
...
This allows to set test properties in other projects as needed to fix
https://github.com/Martchus/syncthingtray/issues/116 .
2021-10-12 23:38:54 +02:00
Martchus
5509caff89
Remove unused `META_CONFIG_PREFIX`
...
This variable was never actually used. I suppose I've been adding it for
places where the config should be added as a prefix. However, this would be
inconsistent and now would also mean a confusing overlap with the
namespacing feature. So let's just remove it.
2021-10-03 23:11:14 +02:00
Martchus
072b7b5136
Apply cmake-format
2021-10-03 23:06:20 +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
9c9a47e551
Define `QT_STATICPLUGIN` when building static Qt plugins
...
This requirement is documented here:
https://doc.qt.io/qt-5/plugins-howto.html#creating-static-plugins
2021-09-16 18:36:35 +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
3a52ae5e22
Prevent attempt to strip import lib for static plugin
2021-09-16 01:05:41 +02:00
Martchus
48c7906bf6
Do not export include dirs for plugins
...
Plugins don't have headers and the non-existant
include directory leads otherwise to configuration
errors when trying to link against a static plugin.
2021-09-16 01:04:19 +02:00
Martchus
18295c98ec
Fix exporting list of required CMake packages
2021-09-11 21:31:17 +02:00
Martchus
6d0148e2c3
Allow overriding BUILD_SHARED_LIBS via a project-specific cache variable
2021-09-11 17:07:43 +02:00
Martchus
af0294f0fb
Apply cmake-format
2021-08-25 19:38:52 +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
643112931c
Fix wrong usage of `APPEND` when marking Windows resource file as generated
2021-08-25 00:56:04 +02:00
Martchus
f55dc67a93
Fix `option(BUILD_SHARED_LIBS …)`
...
* Fix order of arguments
* Keep building static libraries by default to stick with CMake's default
except when devel defaults are enabled and we're targeting GNU/Linux
2021-08-21 23:39:17 +02:00
Martchus
8961cf3a32
Add `META_TIDY_EXCLUDE_REGEX` to exclude files from tidy target
...
This can be useful to exclude 3rd party files.
2021-08-02 16:49:37 +02:00
Martchus
2de07d4cd0
Consider `*.cc` and `*.hh` files formatable
2021-08-02 16:48:35 +02:00
Martchus
db87472be9
Unify and improve code for finding OpenSSL
...
* Unify code for use_openssl and use_crypto
* Make missing OpenSSL targets a fatal error if OpenSSL is required
* Add note that possibly the devel package is missing
* Under Tumbleweed with missing devel package I've got `OpenSSL_FOUND`
but no imported targets because the symlink from the devel package
was missing. This might be due to stale values within the CMake
cache.
2021-07-07 20:51:57 +02:00
Martchus
eace9b44ec
Fix linking statically against OpenSSL
...
`set(… PARENT_SCOPE)` leaves the current scope unaffected so appending the
static dependencies removed the OpenSSL libs themselves again.
2021-07-06 20:02:49 +02:00