summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/FindQt4.cmake3
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmQtAutoGenerators.cxx28
-rw-r--r--Tests/QtAutogen/CMakeLists.txt8
-rw-r--r--Tests/QtAutogen/not_generated_file.qrc5
5 files changed, 31 insertions, 15 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index 9ea77d4..e188c62 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -23,7 +23,8 @@
# .. note::
#
# When using :prop_tgt:`IMPORTED` targets, the qtmain.lib static library is
-# automatically linked on Windows. To disable that globally, set the
+# automatically linked on Windows for :variable:`WIN32 <WIN32_EXECUTABLE>`
+# executables. To disable that globally, set the
# ``QT4_NO_LINK_QTMAIN`` variable before finding Qt4. To disable that
# for a particular executable, set the ``QT4_NO_LINK_QTMAIN`` target
# property to ``TRUE`` on the executable.
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index f42f175..cbe9af2 100644
--- a/Source/CMakeVersion.cmake
+++ b/Source/CMakeVersion.cmake
@@ -2,5 +2,5 @@
set(CMake_VERSION_MAJOR 2)
set(CMake_VERSION_MINOR 8)
set(CMake_VERSION_PATCH 12)
-set(CMake_VERSION_TWEAK 20140205)
+set(CMake_VERSION_TWEAK 20140206)
#set(CMake_VERSION_RC 1)
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index 7e44c26..ab194c3 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -487,19 +487,23 @@ void cmQtAutoGenerators::SetupSourceFiles(cmTarget const* target)
}
std::string ext = sf->GetExtension();
- if (ext == "qrc"
- && !cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTORCC")))
+
+ if (target->GetPropertyAsBool("AUTORCC"))
{
- std::string basename = cmsys::SystemTools::
- GetFilenameWithoutLastExtension(absFile);
-
- std::string rcc_output_file = makefile->GetCurrentOutputDirectory();
- rcc_output_file += "/qrc_" + basename + ".cpp";
- makefile->AppendProperty("ADDITIONAL_MAKE_CLEAN_FILES",
- rcc_output_file.c_str(), false);
- cmSourceFile* rccCppSource
- = makefile->GetOrCreateSource(rcc_output_file.c_str(), true);
- newRccFiles.push_back(rccCppSource);
+ if (ext == "qrc"
+ && !cmSystemTools::IsOn(sf->GetPropertyForUser("SKIP_AUTORCC")))
+ {
+ std::string basename = cmsys::SystemTools::
+ GetFilenameWithoutLastExtension(absFile);
+
+ std::string rcc_output_file = makefile->GetCurrentOutputDirectory();
+ rcc_output_file += "/qrc_" + basename + ".cpp";
+ makefile->AppendProperty("ADDITIONAL_MAKE_CLEAN_FILES",
+ rcc_output_file.c_str(), false);
+ cmSourceFile* rccCppSource
+ = makefile->GetOrCreateSource(rcc_output_file.c_str(), true);
+ newRccFiles.push_back(rccCppSource);
+ }
}
if (!generated)
diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt
index 546ed02..4da125f 100644
--- a/Tests/QtAutogen/CMakeLists.txt
+++ b/Tests/QtAutogen/CMakeLists.txt
@@ -82,7 +82,13 @@ target_link_libraries(libC LINK_PUBLIC libB)
target_link_libraries(QtAutogen codeeditorLib ${QT_LIBRARIES} libC)
-add_library(empty STATIC empty.cpp)
+# Add not_generated_file.qrc to the source list to get the file-level
+# dependency, but don't generate a c++ file from it. Disable the AUTORCC
+# feature for this target. This tests that qrc files in the sources don't
+# have an effect on generation if AUTORCC is off.
+add_library(empty STATIC empty.cpp not_generated_file.qrc)
+set_target_properties(empty PROPERTIES AUTORCC OFF)
+
set_target_properties(empty PROPERTIES AUTOMOC TRUE)
target_link_libraries(empty no_link_language)
add_library(no_link_language STATIC empty.h)
diff --git a/Tests/QtAutogen/not_generated_file.qrc b/Tests/QtAutogen/not_generated_file.qrc
new file mode 100644
index 0000000..c769834
--- /dev/null
+++ b/Tests/QtAutogen/not_generated_file.qrc
@@ -0,0 +1,5 @@
+<!DOCTYPE RCC><RCC version="1.0">
+<qresource>
+ <file>abc.cpp</file>
+</qresource>
+</RCC>