summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-10-11 14:32:21 (GMT)
committerBrad King <brad.king@kitware.com>2017-10-11 15:19:03 (GMT)
commite7720a0f3f695b55b876689180e32d6c2fc5343c (patch)
treeb2d7b9f521e700fcc01fab3c974a56c148730482
parentb1aa8a4773da5fb4e0d4ee9b7fd224ed9bdbba31 (diff)
downloadCMake-e7720a0f3f695b55b876689180e32d6c2fc5343c.zip
CMake-e7720a0f3f695b55b876689180e32d6c2fc5343c.tar.gz
CMake-e7720a0f3f695b55b876689180e32d6c2fc5343c.tar.bz2
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
-rw-r--r--Modules/FindXMLRPC.cmake3
1 files changed, 2 insertions, 1 deletions
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.")