* CMake: use PROJECT_VERSION instead of solvespace_*_VERSION
In 006539b, solvespace_MAJOR_VERSION etc. were removed.
However, these variables were still referenced in some places.
Solution: Use PROJECT_VERSION instead.
* CMake: re-add link directories for solvespace target
006539b removed the call to link_directories for gtkmm, jsonc & fontconfig.
This leads to linking errors if those libraries are in "non-standard"
paths.
Fix this by introducing a target specific target_link_directories call.
Fixes#1173
* snap: port to core20 & adapt to CMake changes
Moving to core20 was long overdue anyway, and
the recent CMake changes necessitated some fixes.
Also switch to LZO compression for (way) better cold start
performance.
The default icon for XDG mimetypes is the name of the mime with '/'
replaced with '-', unless the mimetype has an 'icon' attribute (and
solvespace-mime.xml does not have it). So the right icon name for
application/x-solvespace is 'application-x-solvespace', not
'application.x-solvespace'. Hence, properly rename the mimetype icons
in non-flatpak and non-snap installations.
They were added with commit a98cdeeb16
and they were only useful for the old Debian menu system, which was
deprecated almost 6 years ago [1]. As the old Debian menu file is no
more provided in the Debian packaging, the XPM versions of the
application icon can be safely removed, as there are already icons in
the XDG hicolor icon theme.
[1] https://lists.debian.org/debian-devel-announce/2015/09/msg00000.html
Also, mark not just curves, but also points and normals derived from
construction requests as construction.
Also, don't always mark arc center point as construction just to
exclude it from chord tolerance bounding box calculation; instead,
special-case it there.
After this commit, if the target system does have modern OpenGL
drivers installed, ANGLE is configured to use them, bypassing most
translation (shaders still have to be translated from ESSL to GLSL).
If there are no OpenGL drivers, such as if the graphics drivers were
installed via Windows Update, DirectX translation is still used. This
results in a very noticeable startup delay and minor performance
degradation.
In addition it is no longer necessary to build with -DOPENGL=1 to be
able to run the binary in wine; everything works out of the box.
Before, wine's incomplete HLSL translator would crash.
This change required renaming the variable `texture` in shaders,
since it shadows the Core GLSL function with the same name, and ANGLE
translates texture2D() calls to texture() calls.