From 42cc602732824df9af239de3b5d7ba05b5797106 Mon Sep 17 00:00:00 2001
From: Oz Linden <oz@lindenlab.com>
Date: Sat, 21 Jul 2012 08:47:36 -0700
Subject: [PATCH] fix finding havok libs in relwithdebinfo mode (uses release
 unless LL_DEBUG_HAVOK is used

---
 indra/cmake/Havok.cmake | 17 ++++++++++-------
 1 file changed, 10 insertions(+), 7 deletions(-)

diff --git a/indra/cmake/Havok.cmake b/indra/cmake/Havok.cmake
index 49b348e9f7c..5c0768abfa9 100644
--- a/indra/cmake/Havok.cmake
+++ b/indra/cmake/Havok.cmake
@@ -7,13 +7,16 @@ list(APPEND Havok_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include/havok/Demo)
 set(HAVOK_DEBUG_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/debug/havok-fulldebug)
 set(HAVOK_RELEASE_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/release/havok)
 
-if (LL_DEBUG_HAVOK AND NOT WIN32)
-    set(HAVOK_RELWITHDEBINFO_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/debug/havok-fulldebug)
-else (LL_DEBUG_HAVOK AND NOT WIN32)
-    # Always link relwithdebinfo to havok-hybrid on windows.
-    set(HAVOK_RELWITHDEBINFO_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/debug/havok-hybrid)
-endif (LL_DEBUG_HAVOK AND NOT WIN32)
-
+if (LL_DEBUG_HAVOK)
+   if (WIN32)
+      # Always link relwithdebinfo to havok-hybrid on windows.
+      set(HAVOK_RELWITHDEBINFO_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/debug/havok-hybrid)
+   else (WIN32)
+      set(HAVOK_RELWITHDEBINFO_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/debug/havok-fulldebug)
+   endif (WIN32)
+else (LL_DEBUG_HAVOK)
+   set(HAVOK_RELWITHDEBINFO_LIBRARY_PATH ${LIBS_PREBUILT_DIR}/lib/release/havok)
+endif (LL_DEBUG_HAVOK)
 
 set(HAVOK_LIBS
     hkBase
-- 
GitLab