summaryrefslogtreecommitdiffstats
path: root/cmake/FindPCRE2.cmake
blob: 7e45c963d7daa04a459f7c3f543d1c96d0a38d8c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13

find_library(PCRE2_LIBRARIES NAMES pcre2-16)
find_path(PCRE2_INCLUDE_DIRS pcre2.h)

if (PCRE2_LIBRARIES STREQUAL "PCRE2_LIBRARIES-NOTFOUND" OR PCRE2_INCLUDE_DIRS STREQUAL "PCRE2_INCLUDE_DIRS-NOTFOUND")
    set(PCRE2_FOUND 0)
else()
    add_library(PCRE2 INTERFACE)
    target_link_libraries(PCRE2 INTERFACE ${PCRE2_LIBRARIES})
    target_include_directories(PCRE2 INTERFACE ${PCRE2_INCLUDE_DIRS})
    set(PCRE2_FOUND 1)
endif()