mirror of
https://gitlab.kitware.com/cmake/cmake.git
synced 2026-10-01 04:03:24 +03:00
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
This commit is contained in:
1 parent
b1aa8a4773
commit
e7720a0f3f
1 file changed
+2
-1
@@ -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.")
|
||||
Reference in new issue
Block a user