Commit Graph

215 Commits

Author SHA1 Message Date
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 f9e545abdc Remove surplus whitespace 2019-08-21 22:31:04 +02:00
Martchus e14b5bf335 Remove unused CMake variable 2019-08-20 22:08:47 +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 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 de2d6f6d98 Improve pkg-config file generation
* Prevent imported library paths pointing to build directory
  ending up in pkg-config file
* Handle targets which reference other targets but have not pkg-config
  module
* Fix check for BUNDLED_TARGETS
2019-08-05 23:45:08 +02:00
Martchus 79855f285d Improve pkg-config file generation
* Don't refer to bundles libraries via its imported location
* Add dependencies of imported targets
2019-08-05 19:07:49 +02:00
Martchus 3d47869bcd Use META_PLUGIN_CATEGORY within build directory
The *.so file might not be found when not in the right
subdirectory.
2019-07-26 22:01:00 +02:00
Martchus eb34ce610d Add domain to ApplicationInfo 2019-07-20 20:57:56 +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
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 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 81a3d4fa94 Don't skip entire use_pkg_config_module if target exists
Otherwise the same library can not be added to another library
variable.
2019-07-09 18:36:28 +02:00
Martchus 7249751d30 Apply clang-format and cmake-format 2019-06-16 16:54:26 +02:00
Martchus 869a3b2ae2 Don't try to install Qt plugins outside of the install prefix
Even if QMake tells us that would be the right location because
it breaks development setups which use a custom install prefix
and set QT_PLUGIN_PATH accordingly.
2019-06-16 16:54:00 +02:00
Martchus fc9e1ff703 Add version header to libraries 2019-06-16 15:33:10 +02:00
Martchus 5607691251 Deal with "bundled" dependencies
* Allow exporting targets from 3rd party projects which are
  built within my own projects. This is required if the build
  scripts of these 3rd party projects don't have an export on
  their own but are used in the public interface or as a dependency
  of a static library.
* Add those libraries to the pkg-config file as well.
2019-06-15 15:30:56 +02: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 93bdf5b4f1 Do not error-out if file system lib not found 2019-06-07 16:45:06 +02:00
Martchus d9b4ca5381 Fix build when not file system library required 2019-06-06 15:20:42 +02:00
Martchus aebd324cf4 Add CMake function to use std::filesystem 2019-06-05 23:48:01 +02:00
Martchus bfdd6ada2b Disable mingw-w64 packaging specific code by default 2019-06-01 16:32:21 +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 e120a897c5 Add use_package to 3rdParty 2019-05-30 14:04:04 +02:00
Martchus a865522e67 Use existing TARGET_INCLUDE_DIRECTORY_BUILD_INTERFACE 2019-05-28 17:55:28 +02:00
Martchus 01f21e63c9 Fix appdata.xml.in 2019-05-19 14:14:25 +02:00
Martchus 6489cae19e Apply cmake-format 2019-05-15 15:52:29 +02:00
Martchus 1a478411d6 Default to C++17 2019-05-11 18:42:38 +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 b4cf641cfd Fix setting library version 2019-05-07 16:49:19 +02:00
Martchus a1267f2015 Fix handling undefined INTERFACE_REQUIRED_PACKAGES 2019-05-06 16:22:35 +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 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 6088f6bb43 Don't include Qt-specific config in config.h 2019-04-13 20:33:39 +02:00
Martchus 0bd53c77b5 Query install directory for Qt plugins from qmake 2019-02-27 21:05:23 +01: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 b2bf0a002b Allow to add default cppunit test application
To get rid of the boilderplate file "cppunit.cpp" in each
project using cppunit for tests.
2019-01-13 22:14:42 +01:00
Martchus f66aa33d61 Reduce indentation in TestTarget.cmake 2019-01-13 22:01:52 +01:00