[Cmake-commits] CMake branch, next, updated. v3.0.0-rc1-912-g64dfd5d
Stephen Kelly
steveire at gmail.com
Wed Mar 12 13:06: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 64dfd5d847b5ea00b58ff53d2fdb58cefe7ed8ce (commit)
via 7ef655505f6afc30592b2f95fa920b37be5e4a7d (commit)
from 6e257cf1538b9845e43b75a782dfcbe40c1aed6e (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=64dfd5d847b5ea00b58ff53d2fdb58cefe7ed8ce
commit 64dfd5d847b5ea00b58ff53d2fdb58cefe7ed8ce
Merge: 6e257cf 7ef6555
Author: Stephen Kelly <steveire at gmail.com>
AuthorDate: Wed Mar 12 13:06:22 2014 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Wed Mar 12 13:06:22 2014 -0400
Merge topic 'fix-Qt5-windows-build' into next
7ef65550 QtDialog: Avoid linking to Qt4 WinMain when using Qt 5.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=7ef655505f6afc30592b2f95fa920b37be5e4a7d
commit 7ef655505f6afc30592b2f95fa920b37be5e4a7d
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 18:05:27 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 4308a4d..31fd5c4 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)
@@ -112,7 +115,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