Commit Graph

371 Commits

Author SHA1 Message Date
Martchus 4a7a9ec32d Add build system check to validate appstream files
* Exclude new tests from `check` target for now as they are currently
  failing
* See https://github.com/Martchus/syncthingtray/issues/158
2022-10-11 19:25:17 +02:00
Martchus faaa40100c Allow using functions for adding desktop/appstream file independently 2022-10-08 21:55:24 +02:00
Martchus 353a74fa96 Avoid separating version parts with dots in DLL name
It looks better to not use dots here as a dot already separates the
extension.
2022-09-11 13:45:07 +02:00
Martchus 3a9a9c6f36 Apply cmake-format 2022-08-22 21:47:19 +02:00
Martchus 70e6ef4b7b Avoid redundant definition of appstream file path 2022-08-22 21:47:08 +02:00
Martchus 9141fcdfd8 Skip creation of desktop/appstream files if not building with GUI support 2022-08-20 18:13:08 +02:00
Martchus fea69428d1 Apply cmake-format 2022-08-11 23:29:37 +02:00
Martchus aa4be0ef70 Fix build errors with CMake 3.24.0
See note in comment; concrete example of build error (when building
syncthingtray against qtforkawesome built with CMake 3.24.0):

```
CMake Error at plasmoid/lib/CMakeLists.txt:15 (find_package):
  Found package configuration file:

    /usr/share/qtquickforkawesome-git/cmake/qtquickforkawesome-gitConfig.cmake

  but it set qtquickforkawesome-git_FOUND to FALSE so package
  "qtquickforkawesome-git" is considered to be NOT FOUND.  Reason given by
  package:

  The following imported targets are referenced, but are missing:
  qtforkawesome-git
```
2022-08-09 20:51:42 +02:00
Martchus c1e93738b6 Fix condition for avoiding `-static` flag
There's no `LINUX`; I suppose `UNIX` is specific enough as well.
2022-04-05 22:10:16 +02:00
Martchus 58c3506ca0 Add opt-out for enforcing static linkage (when generally aiming for static linkage) 2022-04-03 00:51:33 +02:00
Martchus 28a35e9673 Remove project name from headers dir if it already starts with it
This is useful if the repo contains headers in a directory called like the
project itself and should not have any effect on other projects.
2022-03-22 22:02:50 +01:00
Martchus f20ea87f32 Fix using arguments in `configure_test_target` 2021-11-02 17:49:28 +01:00
Martchus 9cbff29c9e Fix passing application path when invoking tests
We need to pass the application's path here; not the path of the test
itself.
2021-11-02 17:48:09 +01:00
Martchus 11574209b3 Add experimental support for generating coverage report via gcc/gcov/lcov 2021-11-01 18:20:51 +01:00
Martchus 37c2b920d0 Remove obsolete check when configuring coverage with Clang
Building shared and static libraries at the same time has been removed as
of version 5 so this message would never be printed and it is not clear
anymore what the actual problem was.
2021-11-01 14:10:22 +01:00
Martchus 5563776061 Expose test name (created via `TestTarget.cmake`) for fixing downstream bug
This allows to set test properties in other projects as needed to fix
https://github.com/Martchus/syncthingtray/issues/116.
2021-10-12 23:38:54 +02:00
Martchus 5509caff89 Remove unused `META_CONFIG_PREFIX`
This variable was never actually used. I suppose I've been adding it for
places where the config should be added as a prefix. However, this would be
inconsistent and now would also mean a confusing overlap with the
namespacing feature. So let's just remove it.
2021-10-03 23:11:14 +02:00
Martchus 072b7b5136 Apply cmake-format 2021-10-03 23:06:20 +02:00
Hannah Rittich b8eee6d9d6 Fix namespace for file names 2021-10-03 02:13:27 +02:00
Hannah Rittich 3730830880 Added namespace for file names 2021-10-02 21:08:10 +02:00
Martchus 9c9a47e551 Define `QT_STATICPLUGIN` when building static Qt plugins
This requirement is documented here:
https://doc.qt.io/qt-5/plugins-howto.html#creating-static-plugins
2021-09-16 18:36:35 +02:00
Martchus 030e6a2034 Source required packages before adding target
The config script for adding the target (which is generated
by CMake) otherwise complains that referenced dependencies
are missing. Not sure why this was never a problem. Maybe
the packages were just present anyways or CMake added
additional checks at some point.
2021-09-16 01:06:35 +02:00
Martchus 3a52ae5e22 Prevent attempt to strip import lib for static plugin 2021-09-16 01:05:41 +02:00
Martchus 48c7906bf6 Do not export include dirs for plugins
Plugins don't have headers and the non-existant
include directory leads otherwise to configuration
errors when trying to link against a static plugin.
2021-09-16 01:04:19 +02:00
Martchus 18295c98ec Fix exporting list of required CMake packages 2021-09-11 21:31:17 +02:00
Martchus 6d0148e2c3 Allow overriding BUILD_SHARED_LIBS via a project-specific cache variable 2021-09-11 17:07:43 +02:00
Martchus af0294f0fb Apply cmake-format 2021-08-25 19:38:52 +02:00
Martchus 1b6ffb561a Fix locating files which are directly under the data dir (and not in the cmake dir) 2021-08-25 19:38:43 +02:00
Martchus 643112931c Fix wrong usage of `APPEND` when marking Windows resource file as generated 2021-08-25 00:56:04 +02:00
Martchus f55dc67a93 Fix `option(BUILD_SHARED_LIBS …)`
* Fix order of arguments
* Keep building static libraries by default to stick with CMake's default
  except when devel defaults are enabled and we're targeting GNU/Linux
2021-08-21 23:39:17 +02:00
Martchus 8961cf3a32 Add `META_TIDY_EXCLUDE_REGEX` to exclude files from tidy target
This can be useful to exclude 3rd party files.
2021-08-02 16:49:37 +02:00
Martchus 2de07d4cd0 Consider `*.cc` and `*.hh` files formatable 2021-08-02 16:48:35 +02:00
Martchus db87472be9 Unify and improve code for finding OpenSSL
* Unify code for use_openssl and use_crypto
* Make missing OpenSSL targets a fatal error if OpenSSL is required
* Add note that possibly the devel package is missing
    * Under Tumbleweed with missing devel package I've got `OpenSSL_FOUND`
      but no imported targets because the symlink from the devel package
      was missing. This might be due to stale values within the CMake
      cache.
2021-07-07 20:51:57 +02:00
Martchus eace9b44ec Fix linking statically against OpenSSL
`set(… PARENT_SCOPE)` leaves the current scope unaffected so appending the
static dependencies removed the OpenSSL libs themselves again.
2021-07-06 20:02:49 +02:00
Martchus 5291c746df Show warning when OpenSSL can be found but imported targets are not present 2021-07-06 19:48:21 +02:00
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 2d50799cff Set C++ standard within `use_standard_filesystem()` in a generic way
It is important that `cmake_policy(SET CMP0067 NEW)` is set before
`include(CheckCXXSourceCompiles)`.
2021-06-22 16:14:59 +02:00
Martchus e961eb9726 Extend compile test for standard filesystem
Apparently the current compile check is not sufficient:

```
[   54s] -- The C compiler identification is GNU 8.2.1
[   54s] -- The CXX compiler identification is GNU 8.2.1
[   54s] -- Check for working C compiler: /usr/bin/gcc-8
[   54s] -- Check for working C compiler: /usr/bin/gcc-8 - works
[   54s] -- Detecting C compiler ABI info
[   54s] -- Detecting C compiler ABI info - done
[   54s] -- Detecting C compile features
[   54s] -- Detecting C compile features - done
[   54s] -- Check for working CXX compiler: /usr/bin/g++-8
[   55s] -- Check for working CXX compiler: /usr/bin/g++-8 - works
…
[   55s] -- Performing Test COULD_COMPILE_TEST_PROGRAM_0
[   55s] -- Performing Test COULD_COMPILE_TEST_PROGRAM_0 - Success
[   55s] -- Linking tageditor against special library for std::filesystem support is not required.
…
[  109s] FAILED: tageditor
[  109s] : && /usr/bin/g++-8  -fmessage-length=0 -grecord-gcc-switches -O2 -Wall -D_FORTIFY_SOURCE=2 -fstack-protector-strong -funwind-tables -fasynchronous-unwind-tables -fstack-clash-protection -DNDEBUG -O2 -g -DNDEBUG  -Wl,--as-needed -Wl,--no-undefined -Wl,-z,now    -rdynamic CMakeFiles/tageditor.dir/tageditor_autogen/mocs_compilation.cpp.o CMakeFiles/tageditor.dir/application/main.cpp.o CMakeFiles/tageditor.dir/cli/attachmentinfo.cpp.o CMakeFiles/tageditor.dir/cli/fieldmapping.cpp.o CMakeFiles/tageditor.dir/cli/helper.cpp.o CMakeFiles/tageditor.dir/cli/mainfeatures.cpp.o CMakeFiles/tageditor.dir/application/knownfieldmodel.cpp.o CMakeFiles/tageditor.dir/application/targetlevelmodel.cpp.o CMakeFiles/tageditor.dir/application/settings.cpp.o CMakeFiles/tageditor.dir/gui/fileinfomodel.cpp.o CMakeFiles/tageditor.dir/misc/htmlinfo.cpp.o CMakeFiles/tageditor.dir/misc/utility.cpp.o CMakeFiles/tageditor.dir/gui/attachmentsedit.cpp.o CMakeFiles/tageditor.dir/gui/attachmentsmodel.cpp.o CMakeFiles/tageditor.dir/gui/codeedit.cpp.o CMakeFiles/tageditor.dir/gui/entertargetdialog.cpp.o CMakeFiles/tageditor.dir/gui/mainwindow.cpp.o CMakeFiles/tageditor.dir/gui/minimumemptyspinbox.cpp.o CMakeFiles/tageditor.dir/gui/notificationlabel.cpp.o CMakeFiles/tageditor.dir/gui/notificationmodel.cpp.o CMakeFiles/tageditor.dir/gui/pathlineedit.cpp.o CMakeFiles/tageditor.dir/gui/picturepreviewselection.cpp.o CMakeFiles/tageditor.dir/gui/filefilterproxymodel.cpp.o CMakeFiles/tageditor.dir/gui/initiate.cpp.o CMakeFiles/tageditor.dir/gui/javascripthighlighter.cpp.o CMakeFiles/tageditor.dir/gui/renamefilesdialog.cpp.o CMakeFiles/tageditor.dir/gui/settingsdialog.cpp.o CMakeFiles/tageditor.dir/gui/tagedit.cpp.o CMakeFiles/tageditor.dir/gui/tagfieldedit.cpp.o CMakeFiles/tageditor.dir/gui/tageditorwidget.cpp.o CMakeFiles/tageditor.dir/dbquery/dbquery.cpp.o CMakeFiles/tageditor.dir/dbquery/musicbrainz.cpp.o CMakeFiles/tageditor.dir/dbquery/makeitpersonal.cpp.o CMakeFiles/tageditor.dir/dbquery/lyricswikia.cpp.o CMakeFiles/tageditor.dir/gui/dbquerywidget.cpp.o CMakeFiles/tageditor.dir/misc/networkaccessmanager.cpp.o CMakeFiles/tageditor.dir/renamingutility/filesystemitem.cpp.o CMakeFiles/tageditor.dir/renamingutility/filesystemitemmodel.cpp.o CMakeFiles/tageditor.dir/renamingutility/filteredfilesystemitemmodel.cpp.o CMakeFiles/tageditor.dir/renamingutility/renamingengine.cpp.o CMakeFiles/tageditor.dir/renamingutility/tageditorobject.cpp.o CMakeFiles/tageditor.dir/tageditor_autogen/3YJK5W5UP7/qrc_icons.cpp.o CMakeFiles/tageditor.dir/tageditor_autogen/3YJK5W5UP7/qrc_scripts.cpp.o CMakeFiles/tageditor.dir/tageditor_autogen/JU62CA5L7X/qrc_tageditor_translations.cpp.o  -o tageditor  /usr/lib64/libqtutilities.so.6.4.1  /usr/lib64/libtagparser.so.10.0.0  /usr/lib64/libQt5Concurrent.so.5.12.7  /usr/lib64/libQt5WebEngineWidgets.so.5.15.3  /usr/lib64/libc++utilities.so.5.10.4  /usr/lib64/libQt5WebEngineCore.so.5.15.3  /usr/lib64/libQt5WebChannel.so.5.12.7  /usr/lib64/libQt5Positioning.so.5.12.7  /usr/lib64/libQt5Quick.so.5.12.7  /usr/lib64/libQt5Qml.so.5.12.7  /usr/lib64/libQt5Network.so.5.12.7  /usr/lib64/libQt5PrintSupport.so.5.12.7  /usr/lib64/libQt5Widgets.so.5.12.7  /usr/lib64/libQt5Gui.so.5.12.7  /usr/lib64/libQt5Core.so.5.12.7 && :
[  109s] /usr/lib64/gcc/x86_64-suse-linux/8/../../../../x86_64-suse-linux/bin/ld: CMakeFiles/tageditor.dir/cli/mainfeatures.cpp.o: in function `Cli::setTagInfo(Cli::SetTagInfoArgs const&)':
[  109s] /home/abuild/rpmbuild/BUILD/tageditor-3.4.0/build/../cli/mainfeatures.cpp:889: undefined reference to `std::filesystem::last_write_time(std::filesystem::__cxx11::path const&, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long, std::ratio<1l, 1000000000l> > >, std::error_code&)'
[  109s] collect2: error: ld returned 1 exit status
```

For `c++utilities` itself it doesn't seem to matter:

```
[   33s] -- Performing Test COULD_COMPILE_TEST_PROGRAM_0
[   35s] -- Performing Test COULD_COMPILE_TEST_PROGRAM_0 - Success
[   35s] -- Linking c++utilities against special library for std::filesystem support is not required.
…
[   43s] [22/22] /usr/bin/cmake -E cmake_symlink_library libc++utilities.so.5.10.4  libc++utilities.so.5 libc++utilities.so && :
[   43s] + RPM_EC=0
```

For some reason the AppImage build doesn't have the problem:

```
[   77s] -- The C compiler identification is GNU 8.2.1
[   77s] -- The CXX compiler identification is GNU 8.2.1
[   77s] -- Check for working C compiler: /usr/bin/gcc-8
[   77s] -- Check for working C compiler: /usr/bin/gcc-8 -- works
[   77s] -- Detecting C compiler ABI info
[   78s] -- Detecting C compiler ABI info - done
[   78s] -- Detecting C compile features
[   78s] -- Detecting C compile features - done
[   78s] -- Check for working CXX compiler: /usr/bin/g++-8
[   78s] -- Check for working CXX compiler: /usr/bin/g++-8 -- works
[   78s] -- Detecting CXX compiler ABI info
[   78s] -- Detecting CXX compiler ABI info - done
[   78s] -- Detecting CXX compile features
[   79s] -- Detecting CXX compile features - done
[   79s] -- Looking for iconv
[   79s] -- Looking for iconv - found
[   79s] -- Using iconv from the standard library for target c++utilities.
[   79s] -- Using std::fstream for NativeFileStream
[   79s] -- Performing Test COULD_COMPILE_TEST_PROGRAM_0
[   80s] -- Performing Test COULD_COMPILE_TEST_PROGRAM_0 - Failed
[   80s] -- Performing Test COULD_COMPILE_TEST_PROGRAM_1
[   81s] -- Performing Test COULD_COMPILE_TEST_PROGRAM_1 - Success
[   81s] -- Linking c++utilities against library "-lstdc++fs" for std::filesystem support.
```
2021-06-17 16:40:05 +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 cd43879390 Remove uses of USES_TERMINAL without COMMAND again as it is not possible 2021-03-17 21:27:21 +01:00
Martchus 4fc415ed5a Allow following test output live when building with ninja 2021-03-05 23:03:59 +01:00
Martchus d1e3a28277 Apply cmake-format 2021-01-08 00:51:49 +01:00
Martchus cabcc11d3e Incorporate extra target suffix used when targeting MinGW in pkg-config file 2021-01-08 00:43:51 +01:00
Martchus 7fb2a9ed73 Avoid duplicating the `lib` prefix in the pkg-config file
This is in accordance with omitting the `lib` prefix of the target if the
project name already starts with `lib`.
2021-01-08 00:39:08 +01:00
Martchus 0be639ea97 Use `-lfoo` form in pkg-config file if dependency doesn't look like a path
So e.g. `-lpthread` is added to the pkg-config file instead of just
`pthread`.
2021-01-08 00:37:14 +01:00
Martchus b1b0c10366 Prevent reading library properties from interface library targets 2021-01-07 20:06:12 +01:00
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 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 80d2823915 Add PROJECT_CONFIG_SUFFIX to the config header 2020-12-14 20:57:05 +01:00
Martchus 6905b1a216 Apply cmake-format 2020-11-25 18:02:24 +01:00
Martchus a40ee3aa7e Use query_qmake_variable_path if available 2020-11-11 18:51:50 +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 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 0b267c7959 Avoid duplicating the "lib" prefix
if the target name already starts with "lib"
2020-09-23 22:48:28 +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 7dab98b257 Use a higher resolution for Windows icons for better High-DPI support 2020-08-05 18:21:52 +02:00
Martchus 84011c2768 Apply CMake format 2020-07-07 12:14:05 +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 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