Skip to content

Commit 1de973d

Browse files
committed
Fix findpcre2 cmake file
1 parent eecc801 commit 1de973d

1 file changed

Lines changed: 7 additions & 12 deletions

File tree

cmake/FindPCRE2.cmake

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,16 @@
11
set(PCRE2_USE_STATIC_LIBS ON)
22

33
# The cmake config files for pcre2 are broken
4-
# find_package(pcre2 CONFIG COMPONENTS 8BIT)
54

6-
if(PCRE2_FOUND)
7-
message(STATUS "Using pcre2 found using find_package")
8-
else()
9-
include(FindPkgConfig)
5+
include(FindPkgConfig)
106

11-
if(PKG_CONFIG_FOUND)
12-
pkg_check_modules(PCRE2 IMPORTED_TARGET libpcre2-8)
7+
if(PKG_CONFIG_FOUND)
8+
pkg_check_modules(PCRE2 IMPORTED_TARGET libpcre2-8)
139

14-
if(PCRE2_FOUND)
15-
message(STATUS "Using pcre2 found using pkg-config")
10+
if(PCRE2_FOUND)
11+
message(STATUS "Using pcre2 found using pkg-config")
1612

17-
add_library(pcre2-8 ALIAS PkgConfig::PCRE2)
18-
endif()
13+
add_library(pcre2-8 ALIAS PkgConfig::PCRE2)
1914
endif()
2015
endif()
2116

@@ -29,4 +24,4 @@ if(NOT PCRE2_FOUND)
2924
# target_link_libraries(pcre2-8 INTERFACE ${PCRE2_LIBRARY})
3025
set_target_properties(pcre2-8 PROPERTIES IMPORTED_LOCATION ${PCRE2_LIBRARY})
3126
set_target_properties(pcre2-8 PROPERTIES IMPORTED_IMPLIB ${PCRE2_LIBRARY})
32-
endif()
27+
endif()

0 commit comments

Comments
 (0)