diff --git a/Tools/CMake/finders/findPCRE.cmake b/Tools/CMake/finders/findPCRE.cmake new file mode 100644 index 0000000000..9db8c09f00 --- /dev/null +++ b/Tools/CMake/finders/findPCRE.cmake @@ -0,0 +1,13 @@ +if(TARGET pcre) + set(PCRE_FOUND TRUE) + set(PCRE_INCLUDE_DIRS $) + 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() \ No newline at end of file