Qt::SkipEmptyParts was introduced in Qt 5.14 and QString::SkipEmptyParts
was deprecated in Qt 5.15. This will avoid warnings when compiling with
Qt 5.15.
The project cafProjectDataModel_UnitTests was triggering multiple
CMake warnings saying that the Widget component was missing when trying
to collect dependencies.
The project cafUserInterface requires the library QtSvg because of the
use of QSvgRenderer in cafUiIconFactory.cpp. The library has to be
linked into the final executable. The target introdicing the dependency
should also be the one specifying it.
This allows us to remove the dependency from targets that doesn't
directly use QtSvg at all.
Closes#10955
- Update the minimum required CMake version to 3.15 for Fwk folders
that might be used as top level projects.
- Remove the minimum required CMake version from projects that is just
included from other top level projects.
Since version 3.19 CMake has been warning that CMake versions below 3.5
is deprecated and support will be removed in the future. This will
silence those warning.
By removing the minimum required version check from projects that is not
intended as top level projects we avoid redundant checks and simplifies
future maintenance.
Closes#10957
It is not sufficient with a forward declaration of QString here. Since
the vector is created in PdmFieldCapability::attributes() the size of
QString must be known at that point.
closes#10950
Include the Vcpkg toolchain file after the installation of the first
package.
When building for the first time from a clean source tree, the Vcpkg
toolchain file does not exist. At the same time CMake is only reading
the toolchain file the very first time it is configuring, but since the
toolchain file is only created when vcpkg is configured on the first
call to vcpkg_install it will never read it. So it is not enough to just
reconfigure.
Note: It is not ideal to include it here since one might at some point
install and search for a package at an erlier point in the script and
fail to find it.
Alternative approaces that I considered:
- Include this file right after including AutoVcpkg. This would require
1 recompilation for the file to be found and read which is
unfortunate.
- Include this file in the config function in AutoVcpkg. This seemed
difficult without including the file for every call to vcpkg_install,
which seems unecessary.
AutoVcpkg assumed that the bootstrap file was in the root project
folder, and not in a cmake subfolder.
Note: It is not correct to use ${CMAKE_CURRENT_LIST_DIR} since this is
inside a function and whould still refer to the folder of the calling
file. The more elegant solution would be to use
${CMAKE_CURRENT_FUNCTION_LIST_DIR}, but that is not available until
CMake 3.17.