Skip to content

Commit

Permalink
Create findPCRE.cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
marauder2k7 committed Dec 31, 2024
1 parent f3a1388 commit 9f88688
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions Tools/CMake/finders/findPCRE.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
if(TARGET pcre)
set(PCRE_FOUND TRUE)
set(PCRE_INCLUDE_DIRS $<TARGET_PROPERTY:pcre,INTERFACE_INCLUDE_DIRECTORIES>)
set(PCRE_LIBRARIES pcre)

# Provide an alias for consistency with modern CMake
if(NOT TARGET PCRE::PCRE)
add_library(PCRE::PCRE ALIAS pcre)
endif()
else()
set(PCRE_FOUND FALSE)
message(FATAL_ERROR "PCRE was not added with add_subdirectory before calling find_package(PCRE).")
endif()

0 comments on commit 9f88688

Please sign in to comment.