Additionally, I have attempted to clean up some CMake issues to make the
package's build interface cleaner, in particular, avoiding polluting the
parent directory's include path with our config.h file (if PCRE2 is being
included as a subdirectory).
This re-adds changes from Theodore's commit:
def175f4a9
and partially reverts changes from Carlo's commit:
92d56a1f7c
---------
Co-authored-by: Theodore Tsirpanis <teo@tsirpanis.gr>
I haven't tackled any controversial steps in this PR - simply tidying the formatting.
I have used the `gersemi` tool, which simply "does its thing". I have additionally renamed a few variables to match standard casing conventions (but I am aware that some lowercased variables are used, for example in package-config files, and have left those alone).
I'm going to commit this because it looks sensible, though I know nothing about MSVC and only a bit about CMake. Note that the failing actions on this PR are unrelated.
breaks `make dist` and while it might be tweaked further, is likely to
need time to stabilize so doing so has been punted for now.
This mostly reverts commit def175f4a9.
* Use standard CMake constructs to export the library's targets.
* Fix typo.
* Document that PCRE2_USE_STATIC_LIBS is not required if only one edition of the library has been built.
* Replace some missed stuff from previous review.
* Don't explicitly set `PCRE2_FOUND` to true.
* Avoid defining the target aliases if they are already defined.
* Set `PCRE2_LIBRARIES` and `PCRE2_***_LIBRARY` for compatibility.
* Change `PCRE2_USE_STATIC_LIBS` to prohibit loading the shared library if set.