summaryrefslogtreecommitdiff
path: root/Source/cmPolicies.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2012-11-20 14:53:41 +0100
committerBrad King <brad.king@kitware.com>2013-01-23 14:15:41 -0500
commite3b5eb6b23e5d2b6034e1c13716abb73ab6b3397 (patch)
tree835263e83ceabd38952b943b25d83a6efb0cf78d /Source/cmPolicies.cxx
parent6c8d8afe344aa2e0ba0c5c881d397a28a559dcbd (diff)
downloadcmake-e3b5eb6b23e5d2b6034e1c13716abb73ab6b3397.tar.gz
Automatically link to the qtmain library when linking to QtCore.
When using QAxServer, ensure that the qtmain library is excluded by reporting an error at CMake time if it is not.
Diffstat (limited to 'Source/cmPolicies.cxx')
-rw-r--r--Source/cmPolicies.cxx21
1 files changed, 21 insertions, 0 deletions
diff --git a/Source/cmPolicies.cxx b/Source/cmPolicies.cxx
index eb7d6668e7..831e92e925 100644
--- a/Source/cmPolicies.cxx
+++ b/Source/cmPolicies.cxx
@@ -508,6 +508,27 @@ cmPolicies::cmPolicies()
"for strict compatibility. "
"The NEW behavior for this policy is to leave the values untouched.",
2,8,11,0, cmPolicies::WARN);
+
+ this->DefinePolicy(
+ CMP0020, "CMP0020",
+ "Automatically link Qt executables to qtmain target on Windows.",
+ "CMake 2.8.10 and lower required users of Qt to always specify a link "
+ "dependency to the qtmain.lib static library manually on Windows. CMake "
+ "2.8.11 gained the ability to evaluate generator expressions while "
+ "determining the link dependencies from IMPORTED targets. This allows "
+ "CMake itself to automatically link executables which link to Qt to the "
+ "qtmain.lib library when using IMPORTED Qt targets. For applications "
+ "already linking to qtmain.lib, this should have little impact. For "
+ "applications which supply their own alternative WinMain implementation "
+ "and for applications which use the QAxServer library, this automatic "
+ "linking will need to be disabled as per the documentation."
+ "\n"
+ "The OLD behavior for this policy is not to link executables to "
+ "qtmain.lib automatically when they link to the QtCore IMPORTED"
+ "target. "
+ "The NEW behavior for this policy is to link executables to "
+ "qtmain.lib automatically when they link to QtCore IMPORTED target.",
+ 2,8,11,0, cmPolicies::WARN);
}
cmPolicies::~cmPolicies()