Commit Graph

882 Commits

Author SHA1 Message Date
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 27c8a17f99 Allow enforcing absence of a target suffix for Syncthing Tray's test helper 2021-01-01 18:38:09 +01:00
Martchus 47f7252bc0 Remove leftover message from debugging 2021-01-01 18:35:49 +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 a5d2aa15e0 Support Qt 6 modules when generating the dependency list for the config header 2021-01-01 18:32:27 +01:00
Martchus f109d36ad2 Add Argument::firstValueOr() for conveniently accessing the first value with a fallback 2021-01-01 18:30:17 +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 293b18b607 Mark destructor of NativeFileStream as override 2020-12-18 21:09:35 +01:00
Martchus 80d2823915 Add PROJECT_CONFIG_SUFFIX to the config header 2020-12-14 20:57:05 +01:00
Martchus 9e940a7858 Add helper to modify a flag enum 2020-12-14 20:56:37 +01:00
Martchus 6905b1a216 Apply cmake-format 2020-11-25 18:02:24 +01:00
Martchus 70f827c78e Apply clang-format 2020-11-25 17:53:28 +01:00
Martchus 28b924fe30 Document API/ABI stability 2020-11-25 17:53:14 +01:00
Martchus ee96e03043 Mark formattedPhraseString() as experimental 2020-11-25 17:51:43 +01:00
Martchus df126ab51c Use std::size_t consistently 2020-11-25 17:51:13 +01:00
Martchus c6095fbaf8 Add –formattedPhraseString() 2020-11-18 00:37:43 +01:00
Martchus a40ee3aa7e Use query_qmake_variable_path if available 2020-11-11 18:51:50 +01:00
Martchus 685fbdb78e Document BUILTIN_TRANSLATIONS_OF_QT 2020-11-11 18:08:58 +01:00
Martchus b84a8fb5e5 Document META_QT_VERSION variable 2020-11-07 21:40:04 +01:00
Martchus f9c93baeab Improve build variables documentation 2020-11-02 23:26:56 +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 e6f4bf3561 Apply clang-format 2020-10-31 20:31:04 +01:00
Martchus 1f4fabcd9f Add operators '*' and '/' to TimeSpan 2020-10-24 22:10:25 +02: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 e2f170ddd5 Fix install-mingw-w64-strip (and underlying targets)
* Fix escaping issues with Ninja
* Use `$<TARGET_LINKER_FILE_NAME:tgt>` to avoid hard-coding
  library extensions
2020-10-10 16:45:58 +02:00
Martchus 98e6f360af Apply cmake-format 2020-10-10 01:07:06 +02:00
Martchus dd41762b70 Add testDirPath() for finding directories with test files
The same as testFilePath(), just for directories.
2020-09-23 22:49:33 +02:00
Martchus 0b267c7959 Avoid duplicating the "lib" prefix
if the target name already starts with "lib"
2020-09-23 22:48:28 +02:00
Martchus a26f3d7e1a Avoid instantiating an std::string for find and replace parameters
This overloads should allow passing an std::string_view or C-string to
findAndReplace() without instantiating an std::string.
2020-09-19 15:40:32 +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 6f6c2e607f Reformat CMakeLists.txt with cmake-format 0.6.11 2020-08-11 23:13:09 +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 7dab98b257 Use a higher resolution for Windows icons for better High-DPI support 2020-08-05 18:21:52 +02:00
Martchus b363498f53 Allow specifying return type in joinStrings()
for joining an std::string from an std::vector<std::string_view>.
2020-07-25 22:53:46 +02:00
Martchus 84011c2768 Apply CMake format 2020-07-07 12:14:05 +02:00
Martchus 07e5752af8 Provide "End" phrases within phraseString() 2020-07-07 12:13:31 +02:00
Martchus d0076e24a7 Get rid of WINDOWS_EXT completely as it is now no longer used 2020-07-04 15:21:55 +02: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 47850ace49 Remove leftovers from _run target
See c66420b1dc
2020-07-04 15:14:14 +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 6ed057b932 Add BinaryWriter::write overload for std::string_view 2020-06-26 22:06:44 +02:00
Martchus 63b5fb9c14 Add PROJECT_VARNAME and PROJECT_VARNAME_UPPER to config header 2020-06-23 02:06:29 +02:00
Martchus 942044ea30 Make cache variable doc string compatible with Qt Creator
The double quotes need to be removed from the doc string. Otherwise, Qt
Creator creates a line like
```
set("EXCLUDE_TESTS_FROM_ALL" "OFF" CACHE "BOOL" "specifies whether to exclude tests from the "all" target (enabled by default)" FORCE)
```
in its `qtcsettings.cmake` which doesn't work because the escaping is
missing.
2020-06-22 22:29:21 +02:00
Martchus f24f09f79a Fix setting test properties for coverage when special target name configured 2020-06-22 22:26:17 +02:00
Martchus 9d59ab5c29 Fix Traits::IsSpecializationOf for references
This check is also supposed to work for references so use the same approach
as for ignoring cv qualifiers.
2020-06-17 21:41:00 +02:00
Martchus 74b010cbb9 Make manually added test targets as part of the check target 2020-06-16 01:09:39 +02:00
Martchus 940593429a Allow ArgumentParserTests to pass when working dir present within testfiles dir 2020-06-16 01:03:39 +02:00
Martchus a9453483a7 Allow adding test targets manually 2020-06-15 22:28:19 +02:00
Martchus 52722be407 Add test helper execHelperAppInSearchPath() 2020-06-10 18:42:50 +02:00
Martchus 2ecc0adceb Add TODO for AdvancedIniFile 2020-06-04 20:49:25 +02:00