We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bd94f9a commit 9be2bd8Copy full SHA for 9be2bd8
1 file changed
cmake/Findlibpcre2-8.cmake
@@ -3,7 +3,14 @@
3
find_package(pcre2 CONFIG REQUIRED)
4
5
if (TARGET PCRE2::8BIT AND NOT TARGET libpcre2-8::libpcre2-8)
6
- add_library(libpcre2-8::libpcre2-8 ALIAS PCRE2::8BIT)
+ # Resolve PCRE2::8BIT to its underlying IMPORTED target before aliasing,
7
+ # matching the approach used by the BDE vcpkg port.
8
+ get_target_property(_pcre2_actual PCRE2::8BIT ALIASED_TARGET)
9
+ if (_pcre2_actual)
10
+ add_library(libpcre2-8::libpcre2-8 ALIAS "${_pcre2_actual}")
11
+ else()
12
+ add_library(libpcre2-8::libpcre2-8 ALIAS PCRE2::8BIT)
13
+ endif()
14
endif()
15
16
set(libpcre2-8_FOUND TRUE)
0 commit comments