Commit Graph

65 Commits

Author SHA1 Message Date
Hannah Rittich 3730830880 Added namespace for file names 2021-10-02 21:08:10 +02: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 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 98e6f360af Apply cmake-format 2020-10-10 01:07:06 +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 d0076e24a7 Get rid of WINDOWS_EXT completely as it is now no longer used 2020-07-04 15:21:55 +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 6273b42643 Fix remaining hard-coded install dirs
See https://github.com/Martchus/cpp-utilities/issues/17#issuecomment-596420331
2020-03-09 10:45:20 +01:00
Martchus e241d718ce Apply cmake-format 2020-03-05 19:05:33 +01:00
Martchus c97dfbfd4c Use GNUInstallDirs
See https://github.com/Martchus/cpp-utilities/issues/17
2020-02-01 00:01:26 +01:00
Martchus a9cb91bee2 Set default visibility explicitely to hidden
Hidden default visibility is already expected to be handled by
users of the library because it is the default under Windows.
2020-01-10 18:05:55 +01:00
Martchus 9d8135bfd7 Require CMake 3.3.0 in all modules 2020-01-10 18:01:13 +01:00
Martchus 1ce06517cc Apply cmake-format 0.6.5 2019-12-27 01:45:30 +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 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 99bc257755 Apply cmake-format 2019-08-06 00:02:38 +02:00
Chih-Hsuan Yen 9264f1ac76
Add icons (*.icns) for Mac OS X/macOS .app bundles 2019-07-20 12:14:30 +08:00
Chih-Hsuan Yen 6f3a1fa086
Make .app bundles work on macOS
By setting CMake variables for Info.plist generation. Some of them are
necessary and others are good to have.
2019-07-17 17:53:16 +08: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 0443905986 Fix creation of desktop files 2019-05-05 23:19:05 +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 716af584c5 Use CMakeParseArguments for add_custom_desktop_file() 2019-04-13 20:33:39 +02:00
Martchus 86f3bf8b3b Apply cmake-format 2019-02-06 17:30:52 +01:00
Martchus 3a65e3ecdd Adjust CMake modules for better Android support 2018-09-16 00:25:04 +02:00
Martchus 2e2b66e398 Add mingw-w64 specific targets only when using mingw-w64 2018-07-27 16:18:27 +02: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 a7880e3d0c Remove *.qm files from targets when built-in translations enabled
This prevents updating *.ts files twice and in parallel leading to
build errors.
2017-11-02 00:10:06 +01:00
Martchus 9c8bb44843 Fix mingw-w64 targets 2017-08-31 02:16:05 +02:00
Martchus f8c7a0a0a8 Do not set BUNDLE DESTINATION unless platform is MacOS X
Because that seems to prevent executables from being installed
when using install-binary target
2017-08-31 02:15:56 +02:00
Martchus 6ed336bf94 Allow specifying install destination for bundles
* Install destination for bundles can be set via
  cache variable BUNDLE_INSTALL_DESTINATION
* Default is the dir used for regular applications
2017-08-05 18:33:57 +02:00
Martchus 36b2498dd6 Allow disabling install targets
Might be useful if install targets cause
problems, eg. under MacOS
2017-07-20 01:43:10 +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 442f7a9b25 Exclude generated files from coverage
* So files generated by moc or qdbusxml2cpp are not
  part of coverage statistics
* When filtering files, llvm-cov prints multiple tables
  showing coverage on function level.
  -> Generate overall coverage stats via awk.
2017-07-09 23:38:11 +02:00
Martchus 6f146072ea Allow overriding 3rd party libs/includes
So passwordfile can be told to use legacy OpenSSL
header in accordance with Qt 5 which still requires
OpenSSL 1.0
2017-07-04 22:44:32 +02:00
Martchus 2174dc516a Allow specifying target compile options via variable 2017-06-18 16:14:45 +02:00
Martchus b8c2e79e3d Use meta-data provided in CMake config for version info
* Don't set custom meta-data on targets
* It isn't exported anyways
* Remove version on application target because itcauses
  CMake to create symlinks
2017-04-15 23:02:41 +02:00
Martchus 412e725309 Append Git revision to version
* Append Git revision and ID of latest commit
  to version displayed via --help
* Can be turned off via option
* Has no effect if the source dir is not
  a Git checkout or Git is not installed
* Implements
  https://github.com/Martchus/tageditor/issues/13
2017-04-15 01:45:03 +02:00
Martchus 91e5a8b0b0 Show version of used libraries in --help
* Include only own libraries and Qt 5 modules
  so far
* First step to implement
  https://github.com/Martchus/tageditor/issues/13
2017-04-15 01:10:38 +02:00
Martchus f86a8b3700 Fix adding dependencies of install-mingw-w64 target 2017-04-04 01:01:03 +02:00
Martchus 663b31c5fe Allow skipping install targets
* via variable META_NO_INSTALL_TARGETS
* since this is just to silence some warnings
  no need to bump minor version
2017-04-01 16:18:32 +02:00
Martchus 2965f0cd00 Improve testing applications
When LINK_TESTS_AGAINST_APP_TARGET set, create a
library in addition to the application so tests can
link against it to check particular functions. This
replaces the current approach of linking against the
application directly which lead to linker errors.
2017-03-27 11:15:14 +02:00
Martchus 64cc931555 Improve CMake modules 2017-02-11 02:30:46 +01:00
Martchus 9087e8da7e Fix dependency of res file for built-in translations 2017-02-09 16:22:33 +01:00
Martchus cb3b50c28c Allow overriding default CXX_STANDARD
to ease using newer C++ features in further
projects without setting the standard manually
for each target
2017-02-04 17:44:46 +01:00