summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-10-11 12:26:53 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-10-24 09:50:47 (GMT)
commit98632effebc7ed59105a67c549989265a3b207f1 (patch)
tree51d4393da7bb727a959cd868ed4661725134a7bd
parent63378baa1ceacbfdd52753e6dc7228ccfc53f4e5 (diff)
downloadCMake-98632effebc7ed59105a67c549989265a3b207f1.zip
CMake-98632effebc7ed59105a67c549989265a3b207f1.tar.gz
CMake-98632effebc7ed59105a67c549989265a3b207f1.tar.bz2
Add the AUTOGEN_TARGETS_FOLDER and obsolete AUTOMOC_TARGETS_FOLDER.
-rw-r--r--Help/manual/cmake-properties.7.rst1
-rw-r--r--Help/prop_gbl/AUTOGEN_TARGETS_FOLDER.rst8
-rw-r--r--Help/prop_gbl/AUTOMOC_TARGETS_FOLDER.rst2
-rw-r--r--Source/cmQtAutoGenerators.cxx11
4 files changed, 19 insertions, 3 deletions
diff --git a/Help/manual/cmake-properties.7.rst b/Help/manual/cmake-properties.7.rst
index bb3acff..c248085 100644
--- a/Help/manual/cmake-properties.7.rst
+++ b/Help/manual/cmake-properties.7.rst
@@ -10,6 +10,7 @@ Properties of Global Scope
.. toctree::
/prop_gbl/ALLOW_DUPLICATE_CUSTOM_TARGETS
+ /prop_gbl/AUTOGEN_TARGETS_FOLDER
/prop_gbl/AUTOMOC_TARGETS_FOLDER
/prop_gbl/DEBUG_CONFIGURATIONS
/prop_gbl/DISABLED_FEATURES
diff --git a/Help/prop_gbl/AUTOGEN_TARGETS_FOLDER.rst b/Help/prop_gbl/AUTOGEN_TARGETS_FOLDER.rst
new file mode 100644
index 0000000..48cc8a1
--- /dev/null
+++ b/Help/prop_gbl/AUTOGEN_TARGETS_FOLDER.rst
@@ -0,0 +1,8 @@
+AUTOGEN_TARGETS_FOLDER
+----------------------
+
+Name of FOLDER for ``*_automoc`` targets that are added automatically by CMake for targets for which AUTOMOC is enabled.
+
+If not set, CMake uses the FOLDER property of the parent target as a
+default value for this property. See also the documentation for the
+FOLDER target property and the AUTOMOC target property.
diff --git a/Help/prop_gbl/AUTOMOC_TARGETS_FOLDER.rst b/Help/prop_gbl/AUTOMOC_TARGETS_FOLDER.rst
index c83fb8b..185e0ec 100644
--- a/Help/prop_gbl/AUTOMOC_TARGETS_FOLDER.rst
+++ b/Help/prop_gbl/AUTOMOC_TARGETS_FOLDER.rst
@@ -3,6 +3,8 @@ AUTOMOC_TARGETS_FOLDER
Name of FOLDER for ``*_automoc`` targets that are added automatically by CMake for targets for which AUTOMOC is enabled.
+This property is obsolete. Use AUTOGEN_TARGETS_FOLDER instead.
+
If not set, CMake uses the FOLDER property of the parent target as a
default value for this property. See also the documentation for the
FOLDER target property and the AUTOMOC target property.
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index b41ef75..3d915dd 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -269,11 +269,16 @@ void cmQtAutoGenerators::SetupAutoGenerateTarget(cmTarget* target)
workingDirectory.c_str(), depends,
commandLines, false, autogenComment.c_str());
// Set target folder
- const char* automocFolder = makefile->GetCMakeInstance()->GetProperty(
+ const char* autogenFolder = makefile->GetCMakeInstance()->GetProperty(
"AUTOMOC_TARGETS_FOLDER");
- if (automocFolder && *automocFolder)
+ if (!autogenFolder)
{
- autogenTarget->SetProperty("FOLDER", automocFolder);
+ autogenFolder = makefile->GetCMakeInstance()->GetProperty(
+ "AUTOGEN_TARGETS_FOLDER");
+ }
+ if (autogenFolder && *autogenFolder)
+ {
+ autogenTarget->SetProperty("FOLDER", autogenFolder);
}
else
{