From 9e4b605fca5a087a36ff9a102dbbd0c2f3f1508c Mon Sep 17 00:00:00 2001 From: Paul Fultz II Date: Fri, 18 Jan 2019 14:13:35 -0600 Subject: [PATCH] Properly find pcre (#1607) --- cli/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cli/CMakeLists.txt b/cli/CMakeLists.txt index 474322943..ac774faca 100644 --- a/cli/CMakeLists.txt +++ b/cli/CMakeLists.txt @@ -10,7 +10,10 @@ list(REMOVE_ITEM srcs ${mainfile}) add_library(cli_objs OBJECT ${hdrs} ${srcs}) add_executable(cppcheck ${hdrs} ${mainfile} $ $ $ $) if (HAVE_RULES) - target_link_libraries(cppcheck pcre) + find_library(PCRE_LIBRARY pcre) + target_link_libraries(cppcheck ${PCRE_LIBRARY}) + find_path(PCRE_INCLUDE pcre.h) + target_include_directories(cppcheck PUBLIC ${PCRE_INCLUDE}) endif() if (WIN32 AND NOT BORLAND) target_link_libraries(cppcheck Shlwapi.lib)