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
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
74b010cbb9
Make manually added test targets as part of the check target
2020-06-16 01:09:39 +02:00
Martchus
a9453483a7
Allow adding test targets manually
2020-06-15 22:28:19 +02:00
Martchus
fe5dc5e6a7
Apply cmake-format 0.6.10
2020-04-27 22:59:06 +02:00
Martchus
1c6315a078
Add opt-outs for additional linker flags to achieve a fully statically linked build
...
See https://github.com/Martchus/syncthingtray/issues/64
2020-04-27 22:55:06 +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
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
e9803a41dc
Fix inconsistent variables for compile options/definitions
...
So these options/definitions should no longer be missing in some
places, e.g. the pkg-config file.
2020-02-14 13:22:47 +01:00
Martchus
4dd2179f19
Fix remaining install dirs to use GNUInstallDirs consistently
2020-02-13 11:32:28 +01:00
Martchus
b2a2773cdf
Support passing absolute path to CMAKE_INSTALL_INCLUDEDIR
...
See https://github.com/Martchus/cpp-utilities/issues/18
2020-02-13 11:19:36 +01:00
Martchus
1eb64f1208
Make install directory for bash completion files customizable
...
* Use CMAKE_INSTALL_DATAROOTDIR for default
* Allow overriding via BASH_COMPLETION_INSTALL_DIR
2020-02-10 17:22:17 +01:00
Martchus
115133b7a5
Use target name for bash completion file
...
Otherwise it doesn't seem to be sourced automatically
2020-02-10 17:15:32 +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
f5e275288d
Reformat CMake files with cmake-format 0.6.7
2020-01-26 19:24:04 +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
522d2e8cc8
Avoid an indentation level in TestTarget.cmake
2020-01-20 17:57:03 +01:00
Martchus
d5930c8d60
Set visbility preset for test application to default
2020-01-20 17:54:28 +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
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
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