* Avoid forcefully setting cache variables; use a normal variable
instead
* Use the imported target generated from the pkg-config which hopefully
works better than using the variables directly
* Avoid warning when the find module was used; this is the case for
vcpkg and there the provided CppUnit library is good enough
Otherwise the wrapper might depend on `libgcc` or `libstdc++` on builds
that link against these libraries otherwise statically. Not sure why this
is only an issue on 32-bit builds. (The different exeption handling can
only explain `libgcc` but not `libstdc++`.)
Enabling both depending on `ENABLE_DEVEL_DEFAULTS` limits the usefulness of
`ENABLE_DEVEL_DEFAULTS` because it can then only be used of both tools are
installed (and especially `cmake-format` might not be installed). It makes
more sense to simply enable those targets depending on whether the tools
are installed or not. If they are explicitly enabled it is still a hard
error if the tools cannot be found.
Judging by the code the CMake find module actually attempts to cover this
case but it doesn't seem to work in practice - at least not when there are
only static libs and thus we find those static libs without explicitly
specifying `OPENSSL_USE_STATIC_LIBS`.
Starting the console from a GUI application is not working very
well - so let's just provide a 2nd executable for the CLI. It
will be a simple console application that merely invokes the main
application passing all standard I/O. Unfortunately this does not
mean the existing hacks can be removed. Without them the wrapper
still doesn't get any I/O from the GUI application.
* Locate test files in all source directories specified in `srcdirref`
* Allow overriding contents of `srcdirref` so the directory of another
component (within the same repository) can be appended to share testfiles
* Remove `FORCE` in initialization of cache variables as this makes the
library/include dir effectively *not* configurable
* Try using `find_package()` as the vcpkg package provides a CMake module
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
```
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.
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.