Proper versioning for CMake
This patch is aimed at packaging correctly the version for libxml2 for CMake number (thanks for the initial configuration btw!).
The version number and the compatibility policy are defined by CMake in a dedicated file (libxml2-config-version.cmake) that comes in addition to the configuration file (libxml2-config.cmake)
The behaviour set up is the same as the one in place for the configuration file (generation through autotools, deployment, etc.).
Open question : I am not certain of the compatibility policy of version number, in the following patch, the version compatibilty implemented and documented is as follows : a version number is compatible to any version number with the same major and with a complete version number is greater or equal than the version number asked for. Eg:
- asked 1.2.3 not compatible with 2.4.5
- asked 1.2.3 not compatible with 1.2.2
- asked 1.2.3 compatible with 1.2.3
- asked 1.2.3 compatible with 1.4.5
For reference: https://cmake.org/cmake/help/v3.14/manual/cmake-packages.7.html#package-version-file