Commit Graph

104 Commits

Author SHA1 Message Date
Martchus b3ebe5ce38 Fix typos found via `codespell --skip .git -w` 2021-07-03 19:07:49 +02:00
Martchus 6d1f242edc Fix typo 2021-06-27 18:51:27 +02:00
Martchus 7cea979261 Remove obsolete comment about ios_base::failure and new ABI 2021-05-13 16:23:10 +02:00
Martchus 6d5045c2b1 Port away from deprecated WriteCompilerDetectionHeader module 2021-05-13 15:49:53 +02:00
Martchus e2a7d807a3 Disable warnings about unused const variables
as these are usually just used in another compile unit
2021-03-22 13:45:16 +01:00
Martchus 9c532cbdd9 Ignore unknown warning options 2021-03-20 21:57:09 +01:00
Martchus d38a9bb776 Disable/weaken a few warnings again which don't seem to be very usefull after all 2021-03-20 20:58:28 +01:00
Martchus f5aeeb77aa Add CMake variable to enable defaults useful for development 2021-03-18 00:39:04 +01:00
Martchus 5b8520d50c Add CMake variables to conveniently enable warnings and treat them as errors 2021-03-18 00:25:00 +01:00
Martchus 4fc415ed5a Allow following test output live when building with ninja 2021-03-05 23:03:59 +01:00
Martchus 27c8a17f99 Allow enforcing absence of a target suffix for Syncthing Tray's test helper 2021-01-01 18:38:09 +01:00
Martchus 8a9d72bee9 Disable linking against default Qt plugins
This change would obviously better go into qtutilities. However, it is
easier done here and doesn't pull in any dependency on Qt anyways.
2020-12-20 17:53:37 +01:00
Martchus 6905b1a216 Apply cmake-format 2020-11-25 18:02:24 +01:00
Martchus e5989dd4d1 Allow setting a display name for the configuration
This also allow to clear the display name because it isn't always nice to
incorporate it within the application name (e.g. static Windows builds).
2020-11-02 23:26:37 +01:00
Martchus 3a8ae77477 Improve handling configuration suffix
* Use configuration suffix when installing icons
* Include configuration name suffix in application name

This way differently configured versions of the same applications should be
co-installable within the same prefix. That is useful to install the Qt 6
version of an application alongside the Qt 5 version.
2020-10-23 16:58:41 +02:00
Martchus 26b6ef0486 Avoid 'not a git repository (or any of the parent directories)' during configuration
Try to append the Git revision only if the source directory is actually a
Git checkout.
2020-09-12 22:24:45 +02:00
Martchus 60d9a80b6a Improve icon generation
* Remove PNG_ICON_CROP
    * Not sure how that was supposed to be useful because even for projects
      without PNG_ICON_NO_CROP it does not make much sense
* Test multiple sizes to determine the PNG path automatically
* Locate PNG in basic config so the path is also automatically determined
  for the macOS bundle as well
* Log status message when ffmpeg/png2icns are not available
* Format CMake code more nicely
2020-08-11 23:12:17 +02:00
Martchus fe5dc5e6a7 Apply cmake-format 0.6.10 2020-04-27 22:59:06 +02:00
Martchus e94d42f19c Support passing absolute path to CMAKE_INSTALL_BINDIR/LIBDIR
Same as b2a2773 but for CMAKE_INSTALL_BINDIR and CMAKE_INSTALL_LIBDIR.
2020-03-05 14:52:52 +01:00
Martchus 0733f0705d Check one more parent level for LICENSE file
Hack to fix license auto-detection for Plasmoid
2020-02-14 22:30:10 +01:00
Martchus 2b3adc3a6f Don't prefix CMAKE_INSTALL_DATAROOTDIR; it might be absolute
Same as https://github.com/Martchus/cpp-utilities/issues/18 but for
the share directory.
2020-02-14 22:29:07 +01:00
Martchus 4dd2179f19 Fix remaining install dirs to use GNUInstallDirs consistently 2020-02-13 11:32:28 +01:00
Martchus 30878fab07 Prevent duplicated LIB_SUFFIX
Some build system macros might pass CMAKE_INSTALL_LIBDIR/LIB_INSTALL_DIR
and LIB_SUFFIX at the same time. I suppose in this case the LIB_SUFFIX
should not be added if it is already present to avoid `lib6464`.
2020-02-04 17:09:47 +01:00
Martchus fe43824c98 Allow passing LIB_INSTALL_DIR as well
That variable (but not `CMAKE_INSTALL_LIBDIR`) is apparently
passed when building for Fedora with the `%cmake` RPM macro.
2020-02-04 15:30:01 +01:00
Martchus dcb1d896c2 Apply cmake-format 2020-02-04 15:24:13 +01:00
Martchus c97dfbfd4c Use GNUInstallDirs
See https://github.com/Martchus/cpp-utilities/issues/17
2020-02-01 00:01:26 +01:00
Martchus 0b56ecfb04 Run cmake-format individually for each file
Seems like cmake-format 0.6.7 only applies CLI options
to the first file anymore. So in order to have the options
applied to all files and not just the first one just
invoke it for each file individually.
2020-01-26 19:23:18 +01:00
Martchus 9d8135bfd7 Require CMake 3.3.0 in all modules 2020-01-10 18:01:13 +01:00
Martchus 3fb40baebc Reformat CMake scripts against cmake-format 0.6.3 2019-12-15 18:58:42 +01:00
Martchus 6376819c07 Apply cmake-format v0.6.0 2019-11-30 17:58:01 +01:00
Martchus 7cdfca9407 Apply cmake-format 2019-09-14 20:52:57 +02:00
Martchus ea2804f147 Allow user to append custom libs to linker line
Use-case is explained in the documentation. This implementation
takes care that the additional libs actually occur at the end
of the linker line despite the use of imported targets with
INTERFACE_LINK_LIBRARIES. It might still not be perfect but
sufficient for current use-cases.
2019-08-24 13:00:32 +02:00
Martchus c483dcc7bf Remove obsolete code for handling static targets 2019-08-06 17:43:12 +02:00
Martchus 99bc257755 Apply cmake-format 2019-08-06 00:02:38 +02:00
Martchus d168717023 Configure install destinations already in BasicConfig.cmake
It might be already useful before the library config is applied.
2019-08-05 23:46:09 +02:00
Martchus d184370fea Add note about project()
So I don't get the bright idea to revert recent
changes again in some future refactoring.
2019-07-20 18:04:10 +02:00
Martchus d318585fb2 Add EXCLUDED_FILES variable
When adding source files to the _FILES variables conditionally
those are so far not being formatted or translated. Adding
these files at least to the EXCLUDED_FILES will fix this.

Replaces DOC_ONLY_FILES which served the same purpose but was
limited to documentation.
2019-07-13 14:01:25 +02:00
Chih-Hsuan Yen ee31e5c1d1
Fix building with Xcode 2019-07-13 10:22:21 +08:00
Martchus fd531bdd6a Prefix most of the macros in global.h 2019-06-12 20:34:25 +02:00
Martchus 6c9a956a4f Apply cmake-format 2019-06-10 22:43:42 +02:00
Martchus bc0d7af67f Apply cmake-format 0.5.1
* Disable autosort as it messes with add_library and
  add_executable calls
2019-06-01 12:14:30 +02:00
Martchus 1a478411d6 Default to C++17 2019-05-11 18:42:38 +02:00
Martchus a17f322f3c Apply cmake-format 2019-05-04 20:57:56 +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 86f3bf8b3b Apply cmake-format 2019-02-06 17:30:52 +01:00
Martchus 42dd86a16e Support cmake-format via tidy target 2019-02-05 22:51:07 +01:00
Martchus 8ed1a03f92 Consider *.c and *.hpp files formattable as well 2018-12-08 19:06:01 +01:00
Martchus 2f0a7050ac Auto-detect bugtracker on Gitea 2018-12-08 19:04:48 +01:00