mirror of
https://github.com/yhirose/cpp-httplib.git
synced 2025-05-10 01:33:53 +00:00
Fix FindBrotli when no Brotli installed (#598)
Woops. Ref https://github.com/yhirose/cpp-httplib/issues/582#issuecomment-667537002
This commit is contained in:
parent
5f76cb01c7
commit
abaf875c42
@ -166,6 +166,9 @@ foreach(_target_name "common" "decoder" "encoder")
|
|||||||
elseif(Brotli_FIND_REQUIRED_${_target_name})
|
elseif(Brotli_FIND_REQUIRED_${_target_name})
|
||||||
# Only bother with an error/failure if they actually required the lib.
|
# Only bother with an error/failure if they actually required the lib.
|
||||||
brotli_err_msg("Failed to find Brotli's ${_target_name} library. Try manually defining \"Brotli_${_target_name}\" to its path on your system.")
|
brotli_err_msg("Failed to find Brotli's ${_target_name} library. Try manually defining \"Brotli_${_target_name}\" to its path on your system.")
|
||||||
|
# If the compnent was required but not found, you set XXX_FOUND to false to signify failure to find component(s)
|
||||||
|
# This is used in find_package_handle_standard_args's HANDLE_COMPONENTS (I think)
|
||||||
|
set(Brotli_FOUND FALSE)
|
||||||
endif()
|
endif()
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
@ -173,6 +176,7 @@ include(FindPackageHandleStandardArgs)
|
|||||||
find_package_handle_standard_args(Brotli
|
find_package_handle_standard_args(Brotli
|
||||||
FOUND_VAR Brotli_FOUND
|
FOUND_VAR Brotli_FOUND
|
||||||
REQUIRED_VARS ${_brotli_req_vars}
|
REQUIRED_VARS ${_brotli_req_vars}
|
||||||
|
HANDLE_COMPONENTS
|
||||||
)
|
)
|
||||||
|
|
||||||
if(Brotli_FOUND)
|
if(Brotli_FOUND)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user