From e7720a0f3f695b55b876689180e32d6c2fc5343c Mon Sep 17 00:00:00 2001 From: Brad King Date: Wed, 11 Oct 2017 10:32:21 -0400 Subject: FindXMLRPC: Tolerate no include directories `xmlrpc-c-config $modules --cflags` may report no `-I` flags if the headers are in a standard location like `/usr/include`. In this case it is okay for `XMLRPC_INCLUDE_DIRS` to be empty. Ideally the `--cflags` output should be used as hints for a `find_path` call to really find the headers as we do for other find modules, but simply assuming no explicit include directories are needed is good enough for now. Fixes: #17347 --- Modules/FindXMLRPC.cmake | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Modules/FindXMLRPC.cmake b/Modules/FindXMLRPC.cmake index d857382..e7ae919 100644 --- a/Modules/FindXMLRPC.cmake +++ b/Modules/FindXMLRPC.cmake @@ -57,6 +57,7 @@ if(XMLRPC_C_FOUND) XMLRPC_C_CONFIG_CFLAGS "${XMLRPC_C_CONFIG_CFLAGS}") # Look for -I options. + # FIXME: Use these as hints to a find_path call to find the headers. set(XMLRPC_INCLUDE_DIRS) foreach(flag ${XMLRPC_C_CONFIG_CFLAGS}) if("${flag}" MATCHES "^-I(.+)") @@ -123,5 +124,5 @@ endif() include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake) FIND_PACKAGE_HANDLE_STANDARD_ARGS( XMLRPC - REQUIRED_VARS XMLRPC_C_FOUND XMLRPC_LIBRARIES XMLRPC_INCLUDE_DIRS + REQUIRED_VARS XMLRPC_C_FOUND XMLRPC_LIBRARIES FAIL_MESSAGE "XMLRPC was not found. Make sure the entries XMLRPC_* are set.") -- cgit v0.12