Fix Findproj.cmake and crash at start-up
This pull request fixes two problems in the current code base.
-
On my system (Ubuntu 20.04), Findproj.cmake was not able to deduce the version number of PROJ from the header of the installed version (version 6.3). I've adapted the script to correctly extract the version number and major, minor and patch revision. This should work consistently across different versions of PROJ.
-
In commit 9a465f08, a call to
generateGeometry
was added toMGraticuleActor::loadConfiguration
. This crashes the application at start-up if a graticule actor is added to the initial actors infrontend.cfg
(as suggested in the tutorial on https://met3d.readthedocs.io/), asMGLResourcesManager::initialize
was not yet called at this point in time. I fixed this problem by first checking whetherMSystemManagerAndControl::getInstance()->applicationIsInitialized()
is true. Please just tell me if you think this fix might have some undesirable side effects (like that the actor is not correctly initialized).