From 4cafb72616f9c9adf4f17371ef2e891ed0766b41 Mon Sep 17 00:00:00 2001
From: Bill Hoffman <bill.hoffman@kitware.com>
Date: Tue, 1 Aug 2006 10:51:17 -0400
Subject: ENH: fix qtmain for release

---
 Modules/FindQt4.cmake | 5 +++++
 Modules/UseQt4.cmake  | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index 66f7882..3be78b8 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -541,6 +541,11 @@ IF (QT4_QMAKE_FOUND)
       NO_DEFAULT_PATH)
     FIND_LIBRARY(QT_QTMAIN_LIBRARY_DEBUG NAMES qtmaind PATHS ${QT_LIBRARY_DIR}
       NO_DEFAULT_PATH)
+    IF(QT_QTMAIN_LIBRARY_RELEASE)
+      SET(QT_QTMAIN_LIBRARY ${QT_QTMAIN_LIBRARY_RELEASE})
+    ELSE(QT_QTMAIN_LIBRARY_RELEASE)
+      SET(QT_QTMAIN_LIBRARY ${QT_QTMAIN_LIBRARY_DEBUG})
+    ENDIF(QT_QTMAIN_LIBRARY_RELEASE)
   ENDIF(WIN32)
 
   ############################################
diff --git a/Modules/UseQt4.cmake b/Modules/UseQt4.cmake
index 62a1edf..43f48ca 100644
--- a/Modules/UseQt4.cmake
+++ b/Modules/UseQt4.cmake
@@ -107,7 +107,7 @@ IF (QT_USE_QTMAIN)
   IF (WIN32)
     IF (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
       SET(QT_LIBRARIES ${QT_LIBRARIES}
- optimized "${QT_QTMAIN_LIBRARY}"
+ optimized "${QT_QTMAIN_LIBRARY_RELEASE}"
  debug "${QT_QTMAIN_LIBRARY_DEBUG}"
  )
     ELSE (CMAKE_CONFIGURATION_TYPES OR CMAKE_BUILD_TYPE)
-- 
cgit v0.12