When FIND_VERSION is set, don't error out if a lower version is found, just unset GSOAP_FOUND

pull/3669/merge
Isaac Connor 2023-02-22 06:30:03 -05:00
parent 7b36027066
commit 75e8ed5ce0
1 changed files with 3 additions and 2 deletions

View File

@ -106,8 +106,9 @@ find_package_handle_standard_args(GSOAP DEFAULT_MSG GSOAP_CXX_LIBRARIES
mark_as_advanced(GSOAP_INCLUDE_DIR GSOAP_LIBRARIES GSOAP_WSDL2H GSOAP_SOAPCPP2) mark_as_advanced(GSOAP_INCLUDE_DIR GSOAP_LIBRARIES GSOAP_WSDL2H GSOAP_SOAPCPP2)
if(GSOAP_FOUND) if(GSOAP_FOUND)
if(GSOAP_FIND_REQUIRED AND GSOAP_FIND_VERSION AND ${GSOAP_VERSION} VERSION_LESS ${GSOAP_FIND_VERSION}) if(GSOAP_FIND_VERSION AND ${GSOAP_VERSION} VERSION_LESS ${GSOAP_FIND_VERSION})
message(SEND_ERROR "Found GSOAP version ${GSOAP_VERSION} less then required ${GSOAP_FIND_VERSION}.") message("Found GSOAP version ${GSOAP_VERSION} less then required ${GSOAP_FIND_VERSION}.")
unset(GSOAP_FOUND)
endif() endif()
endif() endif()