Skip to content

Commit 92d56a1

Browse files
authored
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 def175f.
1 parent 600d752 commit 92d56a1

File tree

4 files changed

+130
-81
lines changed

4 files changed

+130
-81
lines changed

CMakeLists.txt

Lines changed: 13 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,6 @@
101101
# 2021-08-28 PH added test for realpath()
102102
# 2022-12-10 PH added support for pcre2posix_test
103103
# 2023-01-15 Carlo added C99 as the minimum required
104-
# 2023-06-03 Theodore used standard CMake constructs to export the library's targets.
105104
# 2023-08-06 PH added support for setting variable length lookbehind maximum
106105

107106
# Increased minimum to 3.5 to workaround deprecated backward compatibility
@@ -144,7 +143,6 @@ INCLUDE(CheckFunctionExists)
144143
INCLUDE(CheckSymbolExists)
145144
INCLUDE(CheckIncludeFile)
146145
INCLUDE(CheckTypeSize)
147-
INCLUDE(CMakePackageConfigHelpers)
148146
INCLUDE(GNUInstallDirs) # for CMAKE_INSTALL_LIBDIR
149147

150148
CHECK_INCLUDE_FILE(dirent.h HAVE_DIRENT_H)
@@ -697,9 +695,7 @@ IF(PCRE2_BUILD_PCRE2_8)
697695
VERSION ${LIBPCRE2_8_VERSION}
698696
SOVERSION ${LIBPCRE2_8_SOVERSION})
699697
TARGET_COMPILE_DEFINITIONS(pcre2-8-static PUBLIC PCRE2_STATIC)
700-
TARGET_INCLUDE_DIRECTORIES(pcre2-8-static PUBLIC
701-
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>
702-
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
698+
TARGET_INCLUDE_DIRECTORIES(pcre2-8-static PUBLIC ${PROJECT_BINARY_DIR})
703699
IF(REQUIRE_PTHREAD)
704700
TARGET_LINK_LIBRARIES(pcre2-8-static Threads::Threads)
705701
ENDIF(REQUIRE_PTHREAD)
@@ -712,9 +708,7 @@ IF(PCRE2_BUILD_PCRE2_8)
712708
VERSION ${LIBPCRE2_POSIX_VERSION}
713709
SOVERSION ${LIBPCRE2_POSIX_SOVERSION})
714710
TARGET_LINK_LIBRARIES(pcre2-posix-static pcre2-8-static)
715-
TARGET_INCLUDE_DIRECTORIES(pcre2-posix-static PUBLIC
716-
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>
717-
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
711+
TARGET_INCLUDE_DIRECTORIES(pcre2-posix-static PUBLIC ${PROJECT_BINARY_DIR})
718712
set(targets ${targets} pcre2-posix-static)
719713

720714
IF(MSVC)
@@ -731,9 +725,7 @@ IF(PCRE2_BUILD_PCRE2_8)
731725

732726
IF(BUILD_SHARED_LIBS)
733727
ADD_LIBRARY(pcre2-8-shared SHARED ${PCRE2_HEADERS} ${PCRE2_SOURCES} ${PROJECT_BINARY_DIR}/config.h)
734-
TARGET_INCLUDE_DIRECTORIES(pcre2-8-shared PUBLIC
735-
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>
736-
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
728+
TARGET_INCLUDE_DIRECTORIES(pcre2-8-shared PUBLIC ${PROJECT_BINARY_DIR})
737729
SET_TARGET_PROPERTIES(pcre2-8-shared PROPERTIES
738730
COMPILE_DEFINITIONS PCRE2_CODE_UNIT_WIDTH=8
739731
MACHO_COMPATIBILITY_VERSION "${LIBPCRE2_8_MACHO_COMPATIBILITY_VERSION}"
@@ -747,9 +739,7 @@ IF(PCRE2_BUILD_PCRE2_8)
747739
set(targets ${targets} pcre2-8-shared)
748740

749741
ADD_LIBRARY(pcre2-posix-shared SHARED ${PCRE2POSIX_HEADERS} ${PCRE2POSIX_SOURCES})
750-
TARGET_INCLUDE_DIRECTORIES(pcre2-posix-shared PUBLIC
751-
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>
752-
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
742+
TARGET_INCLUDE_DIRECTORIES(pcre2-posix-shared PUBLIC ${PROJECT_BINARY_DIR})
753743
SET_TARGET_PROPERTIES(pcre2-posix-shared PROPERTIES
754744
COMPILE_DEFINITIONS PCRE2_CODE_UNIT_WIDTH=8
755745
MACHO_COMPATIBILITY_VERSION "${LIBPCRE2_POSIX_MACHO_COMPATIBILITY_VERSION}"
@@ -788,9 +778,7 @@ ENDIF(PCRE2_BUILD_PCRE2_8)
788778
IF(PCRE2_BUILD_PCRE2_16)
789779
IF(BUILD_STATIC_LIBS)
790780
ADD_LIBRARY(pcre2-16-static STATIC ${PCRE2_HEADERS} ${PCRE2_SOURCES} ${PROJECT_BINARY_DIR}/config.h)
791-
TARGET_INCLUDE_DIRECTORIES(pcre2-16-static PUBLIC
792-
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>
793-
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
781+
TARGET_INCLUDE_DIRECTORIES(pcre2-16-static PUBLIC ${PROJECT_BINARY_DIR})
794782
SET_TARGET_PROPERTIES(pcre2-16-static PROPERTIES UNITY_BUILD OFF
795783
COMPILE_DEFINITIONS PCRE2_CODE_UNIT_WIDTH=16
796784
MACHO_COMPATIBILITY_VERSION "${LIBPCRE2_32_MACHO_COMPATIBILITY_VERSION}"
@@ -815,9 +803,7 @@ IF(PCRE2_BUILD_PCRE2_16)
815803

816804
IF(BUILD_SHARED_LIBS)
817805
ADD_LIBRARY(pcre2-16-shared SHARED ${PCRE2_HEADERS} ${PCRE2_SOURCES} ${PROJECT_BINARY_DIR}/config.h)
818-
TARGET_INCLUDE_DIRECTORIES(pcre2-16-shared PUBLIC
819-
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>
820-
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
806+
TARGET_INCLUDE_DIRECTORIES(pcre2-16-shared PUBLIC ${PROJECT_BINARY_DIR})
821807
SET_TARGET_PROPERTIES(pcre2-16-shared PROPERTIES UNITY_BUILD OFF
822808
COMPILE_DEFINITIONS PCRE2_CODE_UNIT_WIDTH=16
823809
MACHO_COMPATIBILITY_VERSION "${LIBPCRE2_32_MACHO_COMPATIBILITY_VERSION}"
@@ -854,9 +840,7 @@ ENDIF(PCRE2_BUILD_PCRE2_16)
854840
IF(PCRE2_BUILD_PCRE2_32)
855841
IF(BUILD_STATIC_LIBS)
856842
ADD_LIBRARY(pcre2-32-static STATIC ${PCRE2_HEADERS} ${PCRE2_SOURCES} ${PROJECT_BINARY_DIR}/config.h)
857-
TARGET_INCLUDE_DIRECTORIES(pcre2-32-static PUBLIC
858-
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>
859-
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
843+
TARGET_INCLUDE_DIRECTORIES(pcre2-32-static PUBLIC ${PROJECT_BINARY_DIR})
860844
SET_TARGET_PROPERTIES(pcre2-32-static PROPERTIES UNITY_BUILD OFF
861845
COMPILE_DEFINITIONS PCRE2_CODE_UNIT_WIDTH=32
862846
MACHO_COMPATIBILITY_VERSION "${LIBPCRE2_32_MACHO_COMPATIBILITY_VERSION}"
@@ -881,9 +865,7 @@ IF(PCRE2_BUILD_PCRE2_32)
881865

882866
IF(BUILD_SHARED_LIBS)
883867
ADD_LIBRARY(pcre2-32-shared SHARED ${PCRE2_HEADERS} ${PCRE2_SOURCES} ${PROJECT_BINARY_DIR}/config.h)
884-
TARGET_INCLUDE_DIRECTORIES(pcre2-32-shared PUBLIC
885-
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}>
886-
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)
868+
TARGET_INCLUDE_DIRECTORIES(pcre2-32-shared PUBLIC ${PROJECT_BINARY_DIR})
887869
SET_TARGET_PROPERTIES(pcre2-32-shared PROPERTIES UNITY_BUILD OFF
888870
COMPILE_DEFINITIONS PCRE2_CODE_UNIT_WIDTH=32
889871
MACHO_COMPATIBILITY_VERSION "${LIBPCRE2_32_MACHO_COMPATIBILITY_VERSION}"
@@ -1124,13 +1106,9 @@ ENDIF(PCRE2_BUILD_TESTS)
11241106
SET(CMAKE_INSTALL_ALWAYS 1)
11251107

11261108
INSTALL(TARGETS ${targets}
1127-
EXPORT pcre2-targets
1128-
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
1109+
RUNTIME DESTINATION bin
11291110
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
11301111
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR})
1131-
INSTALL(EXPORT pcre2-targets
1132-
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pcre2
1133-
NAMESPACE pcre2::)
11341112
INSTALL(FILES ${pkg_config_files} DESTINATION ${CMAKE_INSTALL_LIBDIR}/pkgconfig)
11351113
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/pcre2-config"
11361114
DESTINATION bin
@@ -1142,12 +1120,11 @@ INSTALL(FILES ${PCRE2_HEADERS} ${PCRE2POSIX_HEADERS} DESTINATION include)
11421120
# CMake config files.
11431121
set(PCRE2_CONFIG_IN ${CMAKE_CURRENT_SOURCE_DIR}/cmake/pcre2-config.cmake.in)
11441122
set(PCRE2_CONFIG_OUT ${CMAKE_CURRENT_BINARY_DIR}/cmake/pcre2-config.cmake)
1145-
configure_package_config_file(${PCRE2_CONFIG_IN} ${PCRE2_CONFIG_OUT} INSTALL_DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pcre2)
1123+
configure_file(${PCRE2_CONFIG_IN} ${PCRE2_CONFIG_OUT} @ONLY)
1124+
set(PCRE2_CONFIG_VERSION_IN ${CMAKE_CURRENT_SOURCE_DIR}/cmake/pcre2-config-version.cmake.in)
11461125
set(PCRE2_CONFIG_VERSION_OUT ${CMAKE_CURRENT_BINARY_DIR}/cmake/pcre2-config-version.cmake)
1147-
write_basic_package_version_file(${PCRE2_CONFIG_VERSION_OUT}
1148-
VERSION ${PCRE2_MAJOR}.${PCRE2_MINOR}.0
1149-
COMPATIBILITY SameMajorVersion)
1150-
install(FILES ${PCRE2_CONFIG_OUT} ${PCRE2_CONFIG_VERSION_OUT} DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/pcre2)
1126+
configure_file(${PCRE2_CONFIG_VERSION_IN} ${PCRE2_CONFIG_VERSION_OUT} @ONLY)
1127+
install(FILES ${PCRE2_CONFIG_OUT} ${PCRE2_CONFIG_VERSION_OUT} DESTINATION cmake)
11511128

11521129
FILE(GLOB html ${PROJECT_SOURCE_DIR}/doc/html/*.html)
11531130
FILE(GLOB man1 ${PROJECT_SOURCE_DIR}/doc/*.1)

ChangeLog

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,10 @@ string.
9595
default maximum length 255 characters (same as Perl) but with a function to
9696
adjust the limit.
9797

98-
25. Applied pull request #260, which modernizes the CMake files, also #262,
99-
which updates the zig configuration, and #278 which fixes a bug with out-of-
100-
source-tree CMake build testing.
98+
25. Applied pull request #262, which updates the zig configuration, and #278
99+
which fixes a bug with out-of-source-tree CMake build testing.
101100

102-
26. Add support for LoongArch in JIT.
101+
26. Add support for LoongArch to JIT.
103102

104103
27. Fixed a bug in pcre2_match() in the code for handling the vector of
105104
backtracking frames on the heap, which caused a heap overflow if *LIMIT_HEAP
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
set(PACKAGE_VERSION_MAJOR @PCRE2_MAJOR@)
2+
set(PACKAGE_VERSION_MINOR @PCRE2_MINOR@)
3+
set(PACKAGE_VERSION_PATCH 0)
4+
set(PACKAGE_VERSION @PCRE2_MAJOR@.@PCRE2_MINOR@.0)
5+
6+
# Check whether the requested PACKAGE_FIND_VERSION is compatible
7+
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION OR
8+
PACKAGE_VERSION_MAJOR GREATER PACKAGE_FIND_VERSION_MAJOR)
9+
set(PACKAGE_VERSION_COMPATIBLE FALSE)
10+
else()
11+
set(PACKAGE_VERSION_COMPATIBLE TRUE)
12+
if(PACKAGE_VERSION VERSION_EQUAL PACKAGE_FIND_VERSION)
13+
set(PACKAGE_VERSION_EXACT TRUE)
14+
endif()
15+
endif()

cmake/pcre2-config.cmake.in

Lines changed: 99 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,11 @@
55
#
66
# Static vs. shared
77
# -----------------
8-
# To force using the static library instead of the shared one, one needs
8+
# To make use of the static library instead of the shared one, one needs
99
# to set the variable PCRE2_USE_STATIC_LIBS to ON before calling find_package.
10-
# If the variable is not set, the static library will be used if only that has
11-
# been built, otherwise the shared library will be used.
12-
#
13-
# The following components are supported: 8BIT, 16BIT, 32BIT and POSIX.
14-
# They used to be required but not anymore; all available targets will
15-
# be defined regardless of the requested components.
1610
# Example:
1711
# set(PCRE2_USE_STATIC_LIBS ON)
18-
# find_package(PCRE2 CONFIG)
12+
# find_package(PCRE2 CONFIG COMPONENTS 8BIT)
1913
#
2014
# This will define the following variables:
2115
#
@@ -29,42 +23,70 @@
2923
# PCRE2::32BIT - The 32 bit PCRE2 library.
3024
# PCRE2::POSIX - The POSIX PCRE2 library.
3125

32-
@PACKAGE_INIT@
26+
set(PCRE2_NON_STANDARD_LIB_PREFIX @NON_STANDARD_LIB_PREFIX@)
27+
set(PCRE2_NON_STANDARD_LIB_SUFFIX @NON_STANDARD_LIB_SUFFIX@)
28+
set(PCRE2_8BIT_NAME pcre2-8)
29+
set(PCRE2_16BIT_NAME pcre2-16)
30+
set(PCRE2_32BIT_NAME pcre2-32)
31+
set(PCRE2_POSIX_NAME pcre2-posix)
32+
find_path(PCRE2_INCLUDE_DIR NAMES pcre2.h DOC "PCRE2 include directory")
33+
if (PCRE2_USE_STATIC_LIBS)
34+
if (MSVC)
35+
set(PCRE2_8BIT_NAME pcre2-8-static)
36+
set(PCRE2_16BIT_NAME pcre2-16-static)
37+
set(PCRE2_32BIT_NAME pcre2-32-static)
38+
set(PCRE2_POSIX_NAME pcre2-posix-static)
39+
endif ()
3340

34-
include(CMakeFindDependencyMacro)
35-
if("@REQUIRE_PTHREAD@") # REQUIRE_PTHREAD
36-
find_dependency(Threads)
37-
endif()
41+
set(PCRE2_PREFIX ${CMAKE_STATIC_LIBRARY_PREFIX})
42+
set(PCRE2_SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX})
43+
else ()
44+
set(PCRE2_PREFIX ${CMAKE_SHARED_LIBRARY_PREFIX})
45+
if (MINGW AND PCRE2_NON_STANDARD_LIB_PREFIX)
46+
set(PCRE2_PREFIX "")
47+
endif ()
3848

39-
include("${CMAKE_CURRENT_LIST_DIR}/pcre2-targets.cmake")
49+
set(PCRE2_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX})
50+
if (MINGW AND PCRE2_NON_STANDARD_LIB_SUFFIX)
51+
set(PCRE2_SUFFIX "-0.dll")
52+
endif ()
53+
endif ()
54+
find_library(PCRE2_8BIT_LIBRARY NAMES ${PCRE2_PREFIX}${PCRE2_8BIT_NAME}${PCRE2_SUFFIX} ${PCRE2_PREFIX}${PCRE2_8BIT_NAME}d${PCRE2_SUFFIX} DOC "8 bit PCRE2 library")
55+
find_library(PCRE2_16BIT_LIBRARY NAMES ${PCRE2_PREFIX}${PCRE2_16BIT_NAME}${PCRE2_SUFFIX} ${PCRE2_PREFIX}${PCRE2_8BIT_NAME}d${PCRE2_SUFFIX} DOC "16 bit PCRE2 library")
56+
find_library(PCRE2_32BIT_LIBRARY NAMES ${PCRE2_PREFIX}${PCRE2_32BIT_NAME}${PCRE2_SUFFIX} ${PCRE2_PREFIX}${PCRE2_8BIT_NAME}d${PCRE2_SUFFIX} DOC "32 bit PCRE2 library")
57+
find_library(PCRE2_POSIX_LIBRARY NAMES ${PCRE2_PREFIX}${PCRE2_POSIX_NAME}${PCRE2_SUFFIX} ${PCRE2_PREFIX}${PCRE2_8BIT_NAME}d${PCRE2_SUFFIX} DOC "8 bit POSIX PCRE2 library")
58+
unset(PCRE2_NON_STANDARD_LIB_PREFIX)
59+
unset(PCRE2_NON_STANDARD_LIB_SUFFIX)
60+
unset(PCRE2_8BIT_NAME)
61+
unset(PCRE2_16BIT_NAME)
62+
unset(PCRE2_32BIT_NAME)
63+
unset(PCRE2_POSIX_NAME)
4064

4165
# Set version
42-
set(PCRE2_VERSION "@PCRE2_MAJOR@.@PCRE2_MINOR@.0")
66+
if (PCRE2_INCLUDE_DIR)
67+
set(PCRE2_VERSION "@PCRE2_MAJOR@.@PCRE2_MINOR@.0")
68+
endif ()
4369

44-
# Chooses the linkage of the library to expose in the
45-
# unsuffixed edition of the target.
46-
macro(_pcre2_add_component_target component target)
47-
# If the static library exists and either PCRE2_USE_STATIC_LIBS
48-
# is defined, or the dynamic library does not exist, use the static library.
49-
if(NOT TARGET PCRE2::${component})
50-
if(TARGET pcre2::pcre2-${target}-static AND (PCRE2_USE_STATIC_LIBS OR NOT TARGET pcre2::pcre2-${target}-shared))
51-
add_library(PCRE2::${component} ALIAS pcre2::pcre2-${target}-static)
52-
set(PCRE2_${component}_FOUND TRUE)
53-
# Otherwise use the dynamic library if it exists.
54-
elseif(TARGET pcre2::pcre2-${target}-shared AND NOT PCRE2_USE_STATIC_LIBS)
55-
add_library(PCRE2::${component} ALIAS pcre2::pcre2-${target}-shared)
56-
set(PCRE2_${component}_FOUND TRUE)
57-
endif()
58-
if(PCRE2_${component}_FOUND)
59-
get_target_property(PCRE2_${component}_LIBRARY PCRE2::${component} IMPORTED_LOCATION)
60-
set(PCRE2_LIBRARIES ${PCRE2_LIBRARIES} ${PCRE2_${component}_LIBRARY})
61-
endif()
62-
endif()
63-
endmacro()
64-
_pcre2_add_component_target(8BIT 8)
65-
_pcre2_add_component_target(16BIT 16)
66-
_pcre2_add_component_target(32BIT 32)
67-
_pcre2_add_component_target(POSIX posix)
70+
# Which components have been found.
71+
if (PCRE2_8BIT_LIBRARY)
72+
set(PCRE2_8BIT_FOUND TRUE)
73+
endif ()
74+
if (PCRE2_16BIT_LIBRARY)
75+
set(PCRE2_16BIT_FOUND TRUE)
76+
endif ()
77+
if (PCRE2_32BIT_LIBRARY)
78+
set(PCRE2_32BIT_FOUND TRUE)
79+
endif ()
80+
if (PCRE2_POSIX_LIBRARY)
81+
set(PCRE2_POSIX_FOUND TRUE)
82+
endif ()
83+
84+
# Check if at least one component has been specified.
85+
list(LENGTH PCRE2_FIND_COMPONENTS PCRE2_NCOMPONENTS)
86+
if (PCRE2_NCOMPONENTS LESS 1)
87+
message(FATAL_ERROR "No components have been specified. This is not allowed. Please, specify at least one component.")
88+
endif ()
89+
unset(PCRE2_NCOMPONENTS)
6890

6991
# When POSIX component has been specified make sure that also 8BIT component is specified.
7092
set(PCRE2_8BIT_COMPONENT FALSE)
@@ -83,5 +105,41 @@ endif()
83105
unset(PCRE2_8BIT_COMPONENT)
84106
unset(PCRE2_POSIX_COMPONENT)
85107

86-
# Check for required components.
87-
check_required_components("PCRE2")
108+
include(FindPackageHandleStandardArgs)
109+
set(${CMAKE_FIND_PACKAGE_NAME}_CONFIG "${CMAKE_CURRENT_LIST_FILE}")
110+
find_package_handle_standard_args(PCRE2
111+
FOUND_VAR PCRE2_FOUND
112+
REQUIRED_VARS PCRE2_INCLUDE_DIR
113+
HANDLE_COMPONENTS
114+
VERSION_VAR PCRE2_VERSION
115+
CONFIG_MODE
116+
)
117+
118+
set(PCRE2_LIBRARIES)
119+
if (PCRE2_FOUND)
120+
foreach(component ${PCRE2_FIND_COMPONENTS})
121+
if (PCRE2_USE_STATIC_LIBS)
122+
add_library(PCRE2::${component} STATIC IMPORTED)
123+
target_compile_definitions(PCRE2::${component} INTERFACE PCRE2_STATIC)
124+
else ()
125+
add_library(PCRE2::${component} SHARED IMPORTED)
126+
endif ()
127+
set_target_properties(PCRE2::${component} PROPERTIES
128+
IMPORTED_LOCATION "${PCRE2_${component}_LIBRARY}"
129+
INTERFACE_INCLUDE_DIRECTORIES "${PCRE2_INCLUDE_DIR}"
130+
)
131+
if (component STREQUAL "POSIX")
132+
set_target_properties(PCRE2::${component} PROPERTIES
133+
INTERFACE_LINK_LIBRARIES "PCRE2::8BIT"
134+
LINK_LIBRARIES "PCRE2::8BIT"
135+
)
136+
endif ()
137+
138+
set(PCRE2_LIBRARIES ${PCRE2_LIBRARIES} ${PCRE2_${component}_LIBRARY})
139+
mark_as_advanced(PCRE2_${component}_LIBRARY)
140+
endforeach()
141+
endif ()
142+
143+
mark_as_advanced(
144+
PCRE2_INCLUDE_DIR
145+
)

0 commit comments

Comments
 (0)