Blob Blame History Raw
From e6c14a4e3cd202ff14128e88bbec05237f0fd78b Mon Sep 17 00:00:00 2001
From: Taylor Braun-Jones <taylor@braun-jones.org>
Date: Thu, 6 Jul 2017 09:31:30 -0400
Subject: [PATCH] Fix cmake error from CeresConfig.cmake when Ceres not found

Change-Id: I944c950ecfcb23d4c49b2b4f98852a99913f2f8b
---
 cmake/CeresConfig.cmake.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cmake/CeresConfig.cmake.in b/cmake/CeresConfig.cmake.in
index 14ab3422..fa0697a4 100644
--- a/cmake/CeresConfig.cmake.in
+++ b/cmake/CeresConfig.cmake.in
@@ -84,7 +84,7 @@ macro(CERES_REPORT_NOT_FOUND REASON_MSG)
   # 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