Properly find pcre (#1607)

This commit is contained in:
Paul Fultz II 2019-01-18 14:13:35 -06:00 committed by Daniel Marjamäki
parent 1acbdde302
commit 9e4b605fca
1 changed files with 4 additions and 1 deletions

View File

@ -10,7 +10,10 @@ list(REMOVE_ITEM srcs ${mainfile})
add_library(cli_objs OBJECT ${hdrs} ${srcs}) add_library(cli_objs OBJECT ${hdrs} ${srcs})
add_executable(cppcheck ${hdrs} ${mainfile} $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:tinyxml_objs> $<TARGET_OBJECTS:simplecpp_objs>) add_executable(cppcheck ${hdrs} ${mainfile} $<TARGET_OBJECTS:cli_objs> $<TARGET_OBJECTS:lib_objs> $<TARGET_OBJECTS:tinyxml_objs> $<TARGET_OBJECTS:simplecpp_objs>)
if (HAVE_RULES) 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() endif()
if (WIN32 AND NOT BORLAND) if (WIN32 AND NOT BORLAND)
target_link_libraries(cppcheck Shlwapi.lib) target_link_libraries(cppcheck Shlwapi.lib)