Fix cmake error from CeresConfig.cmake when Ceres not found Change-Id: I944c950ecfcb23d4c49b2b4f98852a99913f2f8b
diff --git a/cmake/CeresConfig.cmake.in b/cmake/CeresConfig.cmake.in index 14ab342..fa0697a 100644 --- a/cmake/CeresConfig.cmake.in +++ b/cmake/CeresConfig.cmake.in
@@ -84,7 +84,7 @@ # FindPackage() use the camelcase library name, not uppercase. if (Ceres_FIND_QUIETLY) message(STATUS "Failed to find Ceres - " ${REASON_MSG} ${ARGN}) - else (Ceres_FIND_REQUIRED) + elseif (Ceres_FIND_REQUIRED) message(FATAL_ERROR "Failed to find Ceres - " ${REASON_MSG} ${ARGN}) else() # Neither QUIETLY nor REQUIRED, use SEND_ERROR which emits an error