[Cmake-commits] CMake branch, next, updated. v3.0.0-rc1-899-gecf89f8

Stephen Kelly steveire at gmail.com
Wed Mar 12 12:01:49 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  ecf89f88ad1f98caa981dbf8098825ad0970e925 (commit)
       via  f417a80310650379fdcd1e9a9d20ec210f39a696 (commit)
       via  b62c826d24531b2cd8d54b467f81d9749261e796 (commit)
      from  bec5a69a42fab55c03d2803ab6e605de39752644 (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=ecf89f88ad1f98caa981dbf8098825ad0970e925
commit ecf89f88ad1f98caa981dbf8098825ad0970e925
Merge: bec5a69 f417a80
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Mar 12 12:01:49 2014 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Mar 12 12:01:49 2014 -0400

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


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f417a80310650379fdcd1e9a9d20ec210f39a696
commit f417a80310650379fdcd1e9a9d20ec210f39a696
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 16:59:50 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 98efd19..9284e58 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=b62c826d24531b2cd8d54b467f81d9749261e796
commit b62c826d24531b2cd8d54b467f81d9749261e796
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 16:58:25 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..98efd19 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 (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:
 Source/QtDialog/CMakeLists.txt |   15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list