Commit 6f74bbaf authored by Brad King's avatar Brad King 💬 Committed by Kitware Robot
Browse files

Merge topic 'findxmlrpc_fix'

eb0cfd28

 FindXMLRPC: handle QUIETLY and REQUIRED correctly

Acked-by: Kitware Robot's avatarKitware Robot <kwrobot@kitware.com>
Merge-request: !887
parents 5b8ac116 eb0cfd28
......@@ -36,13 +36,13 @@ find_program(XMLRPC_C_CONFIG NAMES xmlrpc-c-config)
# Check whether we found anything.
if(XMLRPC_C_CONFIG)
set(XMLRPC_FOUND 1)
set(XMLRPC_C_FOUND 1)
else()
set(XMLRPC_FOUND 0)
set(XMLRPC_C_FOUND 0)
endif()
# Lookup the include directories needed for the components requested.
if(XMLRPC_FOUND)
if(XMLRPC_C_FOUND)
# Use the newer EXECUTE_PROCESS command if it is available.
if(COMMAND EXECUTE_PROCESS)
execute_process(
......@@ -74,12 +74,12 @@ if(XMLRPC_FOUND)
endforeach()
else()
message("Error running ${XMLRPC_C_CONFIG}: [${XMLRPC_C_CONFIG_RESULT}]")
set(XMLRPC_FOUND 0)
set(XMLRPC_C_FOUND 0)
endif()
endif()
# Lookup the libraries needed for the components requested.
if(XMLRPC_FOUND)
if(XMLRPC_C_FOUND)
# Use the newer EXECUTE_PROCESS command if it is available.
if(COMMAND EXECUTE_PROCESS)
execute_process(
......@@ -123,7 +123,7 @@ if(XMLRPC_FOUND)
# If any library is not found then the whole package is not found.
if(NOT XMLRPC_${name}_LIBRARY)
set(XMLRPC_FOUND 0)
set(XMLRPC_C_FOUND 0)
endif()
# Build an ordered list of all the libraries needed.
......@@ -131,19 +131,13 @@ if(XMLRPC_FOUND)
endforeach()
else()
message("Error running ${XMLRPC_C_CONFIG}: [${XMLRPC_C_CONFIG_RESULT}]")
set(XMLRPC_FOUND 0)
set(XMLRPC_C_FOUND 0)
endif()
endif()
# Report the results.
if(NOT XMLRPC_FOUND)
set(XMLRPC_DIR_MESSAGE
"XMLRPC was not found. Make sure the entries XMLRPC_* are set.")
if(NOT XMLRPC_FIND_QUIETLY)
message(STATUS "${XMLRPC_DIR_MESSAGE}")
else()
if(XMLRPC_FIND_REQUIRED)
message(FATAL_ERROR "${XMLRPC_DIR_MESSAGE}")
endif()
endif()
endif()
include(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(
XMLRPC
REQUIRED_VARS XMLRPC_C_FOUND XMLRPC_LIBRARIES XMLRPC_INCLUDE_DIRS
FAIL_MESSAGE "XMLRPC was not found. Make sure the entries XMLRPC_* are set.")
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment