Skip to content

Commit 92ffdd2

Browse files
authored
Merge pull request libgit2#6333 from jpalus/pcre2-detection
cmake: drop posix dependency from pcre* detection
2 parents 50a1f63 + 636a275 commit 92ffdd2

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

cmake/FindPCRE.cmake

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,18 @@
1616
# PCRE_FOUND - True if pcre found.
1717

1818
# Look for the header file.
19-
find_path(PCRE_INCLUDE_DIR NAMES pcreposix.h)
19+
find_path(PCRE_INCLUDE_DIR NAMES pcre.h)
2020

2121
# Look for the library.
2222
find_library(PCRE_LIBRARY NAMES pcre)
23-
find_library(PCRE_POSIX_LIBRARY NAMES pcreposix)
2423

2524
# Handle the QUIETLY and REQUIRED arguments and set PCRE_FOUND to TRUE if all listed variables are TRUE.
2625
include(FindPackageHandleStandardArgs)
27-
find_package_handle_standard_args(PCRE DEFAULT_MSG PCRE_LIBRARY PCRE_POSIX_LIBRARY PCRE_INCLUDE_DIR)
26+
find_package_handle_standard_args(PCRE DEFAULT_MSG PCRE_LIBRARY PCRE_INCLUDE_DIR)
2827

2928
# Copy the results to the output variables.
3029
if(PCRE_FOUND)
31-
set(PCRE_LIBRARIES ${PCRE_LIBRARY} ${PCRE_POSIX_LIBRARY})
30+
set(PCRE_LIBRARIES ${PCRE_LIBRARY})
3231
set(PCRE_INCLUDE_DIRS ${PCRE_INCLUDE_DIR})
3332
else(PCRE_FOUND)
3433
set(PCRE_LIBRARIES)

cmake/FindPCRE2.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
# PCRE2_FOUND - True if pcre found.
1717

1818
# Look for the header file.
19-
find_path(PCRE2_INCLUDE_DIR NAMES pcre2posix.h)
19+
find_path(PCRE2_INCLUDE_DIR NAMES pcre2.h)
2020

2121
# Look for the library.
2222
find_library(PCRE2_LIBRARY NAMES pcre2-8)

0 commit comments

Comments
 (0)