7 Commits

Author SHA1 Message Date
Nicholas Wilson
e62c0e0916 Re-apply "Use standard CMake constructs to export the targets. (#260)" (#739)
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>
2025-04-08 17:37:19 +01:00
Nicholas Wilson
0f22e67e7c Auto-format and minimal cleanup to CMake (#592)
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).
2024-12-07 19:31:05 +00:00
Maciej Sroczyński
cc4f5c2618 Update pcre2-config.cmake.in (#397)
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.
2024-03-23 16:25:26 +00:00
Jonas Kvinge
6aafc18499 pcre2-config.cmake.in: Fix PCRE2 library names (#365)
Fix library names for 16bit, 32bit and posix which incorrectly points to 8bit.
Also add IMPORTED_IMPLIB to fix https://bugreports.qt.io/browse/QTBUG-117907
2024-01-03 15:15:57 +00:00
Carlo Marcelo Arenas Belón
92d56a1f7c Revert "Use standard CMake constructs to export the library's targets. (#260)" (#364)
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.
2023-12-23 10:13:05 +00:00
Theodore Tsirpanis
def175f4a9 Use standard CMake constructs to export the library's targets. (#260)
* 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.
2023-08-15 17:04:56 +01:00
Philip.Hazel
2410fbe386 Apply Jan-Willem Blokland's CMake patches to build both static and shared
libraries, plus some other CMake extensions.
2021-07-11 15:15:24 +00:00