[Cmake-commits] CMake branch, next, updated. v3.0.0-rc1-906-g1875309

Stephen Kelly steveire at gmail.com
Wed Mar 12 12:18:23 EDT 2014


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  18753092b04f8a02795b3f916ffd10093907cd7e (commit)
       via  5263e765f6650b36aeeec4bcbfc102471065d728 (commit)
       via  b67da75fb57045a274a7d9f64721a0c530270ad9 (commit)
      from  e2a3b037a3f7c1615777c215bde3bb9f238093ba (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=18753092b04f8a02795b3f916ffd10093907cd7e
commit 18753092b04f8a02795b3f916ffd10093907cd7e
Merge: e2a3b03 5263e76
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Mar 12 12:18:22 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Mar 12 12:18:22 2014 -0400

    Merge topic 'fix-Qt5-windows-build' into next
    
    5263e765 QtDialog: Don't define KWSYS_CP_UTF8 if using Qt 5.
    b67da75f QtDialog: Avoid linking to Qt4 WinMain when using Qt 5.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5263e765f6650b36aeeec4bcbfc102471065d728
commit 5263e765f6650b36aeeec4bcbfc102471065d728
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Mar 12 16:59:50 2014 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Mar 12 17:18:05 2014 +0100

    QtDialog: Don't define KWSYS_CP_UTF8 if using Qt 5.
    
    Qt 5 expects source code in Utf-8, and the setCodecForCStrings etc
    methods are not available in Qt 5.

diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt
index 5cddeb2..cbb8830 100644
--- a/Source/QtDialog/CMakeLists.txt
+++ b/Source/QtDialog/CMakeLists.txt
@@ -56,11 +56,10 @@ else()
       set(Qt_BIN_DIR ${_Qt_BIN_DIR})
     endif()
   endif()
-endif()
-
 
-if(WIN32 AND KWSYS_ENCODING_DEFAULT_CODEPAGE MATCHES CP_UTF8)
-  add_definitions(-DKWSYS_CP_UTF8)
+  if(WIN32 AND KWSYS_ENCODING_DEFAULT_CODEPAGE MATCHES CP_UTF8)
+    add_definitions(-DKWSYS_CP_UTF8)
+  endif()
 endif()
 
 set(SRCS

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b67da75fb57045a274a7d9f64721a0c530270ad9
commit b67da75fb57045a274a7d9f64721a0c530270ad9
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Mar 12 16:58:03 2014 +0100
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Mar 12 17:18:05 2014 +0100

    QtDialog: Avoid linking to Qt4 WinMain when using Qt 5.
    
    Override the QT_QTMAIN_LIBRARY cache variable with a regular
    variable in the Qt 5 configuration.
    
    Avoid linking to QT_QTMAIN_LIBRARY at all if CMP0020 is available. If
    it is available, it is set at the top of the file, enabling automatic
    linking of the correct WinMain library.

diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt
index 0dd01d8..5cddeb2 100644
--- a/Source/QtDialog/CMakeLists.txt
+++ b/Source/QtDialog/CMakeLists.txt
@@ -37,6 +37,9 @@ if (Qt5Widgets_FOUND)
     get_property(_Qt5_Core_LOCATION TARGET Qt5::Core PROPERTY LOCATION)
     get_filename_component(Qt_BIN_DIR "${_Qt5_Core_LOCATION}" PATH)
   endif()
+
+  set(QT_QTMAIN_LIBRARY Qt5::WinMain)
+
 else()
   set(QT_MIN_VERSION "4.4.0")
   find_package(Qt4 REQUIRED)
@@ -117,7 +120,10 @@ endif()
 set(CMAKE_INCLUDE_CURRENT_DIR ON)
 
 add_executable(cmake-gui WIN32 MACOSX_BUNDLE ${SRCS})
-target_link_libraries(cmake-gui CMakeLib ${QT_QTMAIN_LIBRARY} ${QT_LIBRARIES})
+target_link_libraries(cmake-gui CMakeLib ${QT_LIBRARIES})
+if (NOT POLICY CMP0020)
+  target_link_libraries(cmake-gui ${QT_QTMAIN_LIBRARY})
+endif()
 if(Qt_BIN_DIR)
   set_property(TARGET cmake-gui PROPERTY Qt_BIN_DIR ${Qt_BIN_DIR})
 endif()

-----------------------------------------------------------------------

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list