summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Modules/CMakeFindDependencyMacro.cmake9
-rw-r--r--Modules/FeatureSummary.cmake6
-rw-r--r--Modules/FindQt4.cmake8
-rw-r--r--Source/CMakeVersion.cmake2
-rw-r--r--Source/cmFindPackageCommand.cxx6
-rw-r--r--Source/cmGlobalGenerator.cxx7
-rw-r--r--Source/cmGlobalGenerator.h4
-rw-r--r--Source/cmGlobalVisualStudioGenerator.cxx17
-rw-r--r--Source/cmGlobalVisualStudioGenerator.h4
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx40
-rw-r--r--Source/cmGlobalXCodeGenerator.h3
-rw-r--r--Source/cmInstallTargetGenerator.cxx30
-rw-r--r--Source/cmQtAutoGenerators.cxx34
-rw-r--r--Source/cmQtAutoGenerators.h12
-rw-r--r--Tests/CMakeLists.txt12
-rw-r--r--Tests/Qt4And5Automoc/CMakeLists.txt9
-rw-r--r--Tests/QtAutogen/CMakeLists.txt4
-rw-r--r--Tests/QtAutogen/sub/uiconly.cpp (renamed from Tests/QtAutogen/uiconly.cpp)0
-rw-r--r--Tests/QtAutogen/sub/uiconly.h (renamed from Tests/QtAutogen/uiconly.h)0
-rw-r--r--Tests/QtAutogen/sub/uiconly.ui (renamed from Tests/QtAutogen/uiconly.ui)0
20 files changed, 171 insertions, 36 deletions
diff --git a/Modules/CMakeFindDependencyMacro.cmake b/Modules/CMakeFindDependencyMacro.cmake
index 596c6fc..0f1f56d 100644
--- a/Modules/CMakeFindDependencyMacro.cmake
+++ b/Modules/CMakeFindDependencyMacro.cmake
@@ -45,7 +45,16 @@ macro(find_dependency dep)
set(required_arg REQUIRED)
endif()
+ get_property(alreadyTransitive GLOBAL PROPERTY
+ _CMAKE_${dep}_TRANSITIVE_DEPENDENCY
+ )
+
find_package(${dep} ${version} ${exact_arg} ${quiet_arg} ${required_arg})
+
+ if(NOT DEFINED alreadyTransitive OR alreadyTransitive)
+ set_property(GLOBAL PROPERTY _CMAKE_${dep}_TRANSITIVE_DEPENDENCY TRUE)
+ endif()
+
if (NOT ${dep}_FOUND)
set(${CMAKE_FIND_PACKAGE_NAME}_NOT_FOUND_MESSAGE "${CMAKE_FIND_PACKAGE_NAME} could not be found because dependency ${dep} could not be found.")
set(${CMAKE_FIND_PACKAGE_NAME}_FOUND False)
diff --git a/Modules/FeatureSummary.cmake b/Modules/FeatureSummary.cmake
index b0f8e16..c0e63d5 100644
--- a/Modules/FeatureSummary.cmake
+++ b/Modules/FeatureSummary.cmake
@@ -376,6 +376,12 @@ function(_FS_GET_FEATURE_SUMMARY _property _var _includeQuiet)
set(includeThisOne FALSE)
endif()
endif()
+ get_property(_isTransitiveDepend
+ GLOBAL PROPERTY _CMAKE_${_currentFeature}_TRANSITIVE_DEPENDENCY
+ )
+ if(_isTransitiveDepend)
+ set(includeThisOne FALSE)
+ endif()
if(includeThisOne)
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake
index 21a853d..9ea77d4 100644
--- a/Modules/FindQt4.cmake
+++ b/Modules/FindQt4.cmake
@@ -518,6 +518,14 @@ _qt4_find_qmake("${_QT4_QMAKE_NAMES}" QT_QMAKE_EXECUTABLE QTVERSION)
if (QT_QMAKE_EXECUTABLE AND QTVERSION)
+ if (Qt5Core_FOUND)
+ # Qt5CoreConfig sets QT_MOC_EXECUTABLE as a non-cache variable to the Qt 5
+ # path to moc. Unset that variable when Qt 4 and 5 are used together, so
+ # that when find_program looks for moc, it is not set to the Qt 5 version.
+ # If FindQt4 has already put the Qt 4 path in the cache, the unset()
+ # command 'unhides' the (correct) cache variable.
+ unset(QT_MOC_EXECUTABLE)
+ endif()
if (QT_QMAKE_EXECUTABLE_LAST)
string(COMPARE NOTEQUAL "${QT_QMAKE_EXECUTABLE_LAST}" "${QT_QMAKE_EXECUTABLE}" QT_QMAKE_CHANGED)
endif()
diff --git a/Source/CMakeVersion.cmake b/Source/CMakeVersion.cmake
index 4a70f5a..f42f175 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 20140204)
+set(CMake_VERSION_TWEAK 20140205)
#set(CMake_VERSION_RC 1)
diff --git a/Source/cmFindPackageCommand.cxx b/Source/cmFindPackageCommand.cxx
index c59aafd..73eba51 100644
--- a/Source/cmFindPackageCommand.cxx
+++ b/Source/cmFindPackageCommand.cxx
@@ -1043,6 +1043,12 @@ void cmFindPackageCommand::AppendToFoundProperty(bool found)
//----------------------------------------------------------------------------
void cmFindPackageCommand::AppendSuccessInformation()
{
+ {
+ std::string transitivePropName = "_CMAKE_";
+ transitivePropName += this->Name + "_TRANSITIVE_DEPENDENCY";
+ this->Makefile->GetCMakeInstance()
+ ->SetProperty(transitivePropName.c_str(), "False");
+ }
std::string found = this->Name;
found += "_FOUND";
std::string upperFound = cmSystemTools::UpperCase(found);
diff --git a/Source/cmGlobalGenerator.cxx b/Source/cmGlobalGenerator.cxx
index 03486d8..a61cab1 100644
--- a/Source/cmGlobalGenerator.cxx
+++ b/Source/cmGlobalGenerator.cxx
@@ -3032,3 +3032,10 @@ void cmGlobalGenerator::ProcessEvaluationFiles()
}
}
}
+
+//----------------------------------------------------------------------------
+std::string cmGlobalGenerator::ExpandCFGIntDir(const std::string& str,
+ const std::string& /*config*/) const
+{
+ return str;
+}
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index ebc2db5..753eebf 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -193,6 +193,10 @@ public:
///! What is the configurations directory variable called?
virtual const char* GetCMakeCFGIntDir() const { return "."; }
+ ///! expand CFGIntDir for a configuration
+ virtual std::string ExpandCFGIntDir(const std::string& str,
+ const std::string& config) const;
+
/** Get whether the generator should use a script for link commands. */
bool GetUseLinkScript() const { return this->UseLinkScript; }
diff --git a/Source/cmGlobalVisualStudioGenerator.cxx b/Source/cmGlobalVisualStudioGenerator.cxx
index 42492e6..0c5f35b 100644
--- a/Source/cmGlobalVisualStudioGenerator.cxx
+++ b/Source/cmGlobalVisualStudioGenerator.cxx
@@ -902,3 +902,20 @@ cmGlobalVisualStudioGenerator::OrderedTargetDependSet
this->insert(*ti);
}
}
+
+std::string cmGlobalVisualStudioGenerator::ExpandCFGIntDir(
+ const std::string& str,
+ const std::string& config) const
+{
+ std::string replace = GetCMakeCFGIntDir();
+
+ std::string tmp = str;
+ for(std::string::size_type i = tmp.find(replace);
+ i != std::string::npos;
+ i = tmp.find(replace, i))
+ {
+ tmp.replace(i, replace.size(), config);
+ i += config.size();
+ }
+ return tmp;
+}
diff --git a/Source/cmGlobalVisualStudioGenerator.h b/Source/cmGlobalVisualStudioGenerator.h
index eab613d..9186d65 100644
--- a/Source/cmGlobalVisualStudioGenerator.h
+++ b/Source/cmGlobalVisualStudioGenerator.h
@@ -84,6 +84,10 @@ public:
virtual void FindMakeProgram(cmMakefile*);
+
+ virtual std::string ExpandCFGIntDir(const std::string& str,
+ const std::string& config) const;
+
protected:
// Does this VS version link targets to each other if there are
// dependencies in the SLN file? This was done for VS versions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 46c34d0..484b28f 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -2272,14 +2272,24 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
std::string search_paths;
std::vector<std::string> runtimeDirs;
pcli->GetRPath(runtimeDirs, false);
+ // runpath dirs needs to be unique to prevent corruption
+ std::set<std::string> unique_dirs;
+
for(std::vector<std::string>::const_iterator i = runtimeDirs.begin();
i != runtimeDirs.end(); ++i)
{
- if(!search_paths.empty())
+ std::string runpath = *i;
+ runpath = this->ExpandCFGIntDir(runpath, configName);
+
+ if(unique_dirs.find(runpath) == unique_dirs.end())
{
- search_paths += " ";
+ unique_dirs.insert(runpath);
+ if(!search_paths.empty())
+ {
+ search_paths += " ";
+ }
+ search_paths += this->XCodeEscapePath(runpath.c_str());
}
- search_paths += this->XCodeEscapePath((*i).c_str());
}
if(!search_paths.empty())
{
@@ -3675,6 +3685,30 @@ const char* cmGlobalXCodeGenerator::GetCMakeCFGIntDir() const
"$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)" : ".";
}
+std::string cmGlobalXCodeGenerator::ExpandCFGIntDir(const std::string& str,
+ const std::string& config) const
+{
+ std::string replace1 = "$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)";
+ std::string replace2 = "$(CONFIGURATION)";
+
+ std::string tmp = str;
+ for(std::string::size_type i = tmp.find(replace1);
+ i != std::string::npos;
+ i = tmp.find(replace1, i))
+ {
+ tmp.replace(i, replace1.size(), config);
+ i += config.size();
+ }
+ for(std::string::size_type i = tmp.find(replace2);
+ i != std::string::npos;
+ i = tmp.find(replace2, i))
+ {
+ tmp.replace(i, replace2.size(), config);
+ i += config.size();
+ }
+ return tmp;
+}
+
//----------------------------------------------------------------------------
void cmGlobalXCodeGenerator::GetDocumentation(cmDocumentationEntry& entry)
{
diff --git a/Source/cmGlobalXCodeGenerator.h b/Source/cmGlobalXCodeGenerator.h
index ae7f07e..c9d20c2 100644
--- a/Source/cmGlobalXCodeGenerator.h
+++ b/Source/cmGlobalXCodeGenerator.h
@@ -79,6 +79,9 @@ public:
///! What is the configurations directory variable called?
virtual const char* GetCMakeCFGIntDir() const;
+ ///! expand CFGIntDir
+ virtual std::string ExpandCFGIntDir(const std::string& str,
+ const std::string& config) const;
void SetCurrentLocalGenerator(cmLocalGenerator*);
diff --git a/Source/cmInstallTargetGenerator.cxx b/Source/cmInstallTargetGenerator.cxx
index 68f45a6..7a39f45 100644
--- a/Source/cmInstallTargetGenerator.cxx
+++ b/Source/cmInstallTargetGenerator.cxx
@@ -669,22 +669,36 @@ cmInstallTargetGenerator
cli->GetRPath(oldRuntimeDirs, false);
cli->GetRPath(newRuntimeDirs, true);
- // Note: These are separate commands to avoid install_name_tool
- // corruption on 10.6.
+ // Note: These paths are kept unique to avoid install_name_tool corruption.
+ std::set<std::string> runpaths;
for(std::vector<std::string>::const_iterator i = oldRuntimeDirs.begin();
i != oldRuntimeDirs.end(); ++i)
{
- os << indent << "execute_process(COMMAND " << installNameTool << "\n";
- os << indent << " -delete_rpath \"" << *i << "\"\n";
- os << indent << " \"" << toDestDirPath << "\")\n";
+ std::string runpath = this->Target->GetMakefile()->GetLocalGenerator()->
+ GetGlobalGenerator()->ExpandCFGIntDir(*i, config);
+
+ if(runpaths.find(runpath) == runpaths.end())
+ {
+ runpaths.insert(runpath);
+ os << indent << "execute_process(COMMAND " << installNameTool << "\n";
+ os << indent << " -delete_rpath \"" << runpath << "\"\n";
+ os << indent << " \"" << toDestDirPath << "\")\n";
+ }
}
+ runpaths.clear();
for(std::vector<std::string>::const_iterator i = newRuntimeDirs.begin();
i != newRuntimeDirs.end(); ++i)
{
- os << indent << "execute_process(COMMAND " << installNameTool << "\n";
- os << indent << " -add_rpath \"" << *i << "\"\n";
- os << indent << " \"" << toDestDirPath << "\")\n";
+ std::string runpath = this->Target->GetMakefile()->GetLocalGenerator()->
+ GetGlobalGenerator()->ExpandCFGIntDir(*i, config);
+
+ if(runpaths.find(runpath) == runpaths.end())
+ {
+ os << indent << "execute_process(COMMAND " << installNameTool << "\n";
+ os << indent << " -add_rpath \"" << runpath << "\"\n";
+ os << indent << " \"" << toDestDirPath << "\")\n";
+ }
}
}
else
diff --git a/Source/cmQtAutoGenerators.cxx b/Source/cmQtAutoGenerators.cxx
index cab59fe..7e44c26 100644
--- a/Source/cmQtAutoGenerators.cxx
+++ b/Source/cmQtAutoGenerators.cxx
@@ -1279,8 +1279,8 @@ bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile)
const std::vector<std::string>& headerExtensions =
makefile->GetHeaderExtensions();
- std::vector<std::string> includedUis;
- std::vector<std::string> skippedUis;
+ std::map<std::string, std::string> includedUis;
+ std::map<std::string, std::string> skippedUis;
std::vector<std::string> uicSkipped;
cmSystemTools::ExpandListArgument(this->SkipUic, uicSkipped);
@@ -1290,7 +1290,8 @@ bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile)
{
const bool skipUic = std::find(uicSkipped.begin(), uicSkipped.end(), *it)
!= uicSkipped.end();
- std::vector<std::string>& uiFiles = skipUic ? skippedUis : includedUis;
+ std::map<std::string, std::string>& uiFiles
+ = skipUic ? skippedUis : includedUis;
const std::string &absFilename = *it;
if (this->Verbose)
{
@@ -1350,11 +1351,12 @@ bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile)
{
this->GenerateMoc(it->first, it->second);
}
- for(std::vector<std::string>::const_iterator it = includedUis.begin();
+ for(std::map<std::string, std::string>::const_iterator
+ it = includedUis.begin();
it != includedUis.end();
++it)
{
- this->GenerateUi(*it);
+ this->GenerateUi(it->first, it->second);
}
if(!this->RccExecutable.empty())
@@ -1431,7 +1433,7 @@ bool cmQtAutoGenerators::RunAutogen(cmMakefile* makefile)
void cmQtAutoGenerators::ParseCppFile(const std::string& absFilename,
const std::vector<std::string>& headerExtensions,
std::map<std::string, std::string>& includedMocs,
- std::vector<std::string> &includedUis)
+ std::map<std::string, std::string> &includedUis)
{
cmsys::RegularExpression mocIncludeRegExp(
"[\n][ \t]*#[ \t]*include[ \t]+"
@@ -1619,7 +1621,7 @@ void cmQtAutoGenerators::ParseCppFile(const std::string& absFilename,
void cmQtAutoGenerators::StrictParseCppFile(const std::string& absFilename,
const std::vector<std::string>& headerExtensions,
std::map<std::string, std::string>& includedMocs,
- std::vector<std::string>& includedUis)
+ std::map<std::string, std::string>& includedUis)
{
cmsys::RegularExpression mocIncludeRegExp(
"[\n][ \t]*#[ \t]*include[ \t]+"
@@ -1737,7 +1739,7 @@ void cmQtAutoGenerators::StrictParseCppFile(const std::string& absFilename,
void cmQtAutoGenerators::ParseForUic(const std::string& absFilename,
- std::vector<std::string>& includedUis)
+ std::map<std::string, std::string>& includedUis)
{
if (this->UicExecutable.empty())
{
@@ -1754,9 +1756,9 @@ void cmQtAutoGenerators::ParseForUic(const std::string& absFilename,
}
-void cmQtAutoGenerators::ParseForUic(const std::string&,
+void cmQtAutoGenerators::ParseForUic(const std::string& absFilename,
const std::string& contentsString,
- std::vector<std::string>& includedUis)
+ std::map<std::string, std::string>& includedUis)
{
if (this->UicExecutable.empty())
{
@@ -1768,6 +1770,9 @@ void cmQtAutoGenerators::ParseForUic(const std::string&,
std::string::size_type matchOffset = 0;
+ const std::string absPath = cmsys::SystemTools::GetFilenamePath(
+ cmsys::SystemTools::GetRealPath(absFilename.c_str())) + '/';
+
matchOffset = 0;
if ((strstr(contentsString.c_str(), "ui_") != NULL)
&& (uiIncludeRegExp.find(contentsString)))
@@ -1783,7 +1788,7 @@ void cmQtAutoGenerators::ParseForUic(const std::string&,
// finding the correct header, so we need to remove the ui_ part
basename = basename.substr(3);
- includedUis.push_back(basename);
+ includedUis[absPath] = basename;
matchOffset += uiIncludeRegExp.end();
} while(uiIncludeRegExp.find(contentsString.c_str() + matchOffset));
@@ -1831,7 +1836,7 @@ cmQtAutoGenerators::SearchHeadersForCppFile(const std::string& absFilename,
void cmQtAutoGenerators::ParseHeaders(const std::set<std::string>& absHeaders,
const std::map<std::string, std::string>& includedMocs,
std::map<std::string, std::string>& notIncludedMocs,
- std::vector<std::string>& includedUis)
+ std::map<std::string, std::string>& includedUis)
{
for(std::set<std::string>::const_iterator hIt=absHeaders.begin();
hIt!=absHeaders.end();
@@ -1939,7 +1944,8 @@ bool cmQtAutoGenerators::GenerateMoc(const std::string& sourceFile,
return false;
}
-bool cmQtAutoGenerators::GenerateUi(const std::string& uiFileName)
+bool cmQtAutoGenerators::GenerateUi(const std::string& path,
+ const std::string& uiFileName)
{
if (!cmsys::SystemTools::FileExists(this->Builddir.c_str(), false))
{
@@ -1947,7 +1953,7 @@ bool cmQtAutoGenerators::GenerateUi(const std::string& uiFileName)
}
std::string ui_output_file = "ui_" + uiFileName + ".h";
- std::string ui_input_file = this->Srcdir + uiFileName + ".ui";
+ std::string ui_input_file = path + uiFileName + ".ui";
int sourceNewerThanUi = 0;
bool success = cmsys::SystemTools::FileTimeCompare(ui_input_file.c_str(),
diff --git a/Source/cmQtAutoGenerators.h b/Source/cmQtAutoGenerators.h
index f66d02b..2840fbf 100644
--- a/Source/cmQtAutoGenerators.h
+++ b/Source/cmQtAutoGenerators.h
@@ -48,16 +48,16 @@ private:
bool RunAutogen(cmMakefile* makefile);
bool GenerateMoc(const std::string& sourceFile,
const std::string& mocFileName);
- bool GenerateUi(const std::string& uiFileName);
+ bool GenerateUi(const std::string& path, const std::string& uiFileName);
bool GenerateQrc();
void ParseCppFile(const std::string& absFilename,
const std::vector<std::string>& headerExtensions,
std::map<std::string, std::string>& includedMocs,
- std::vector<std::string>& includedUis);
+ std::map<std::string, std::string>& includedUis);
void StrictParseCppFile(const std::string& absFilename,
const std::vector<std::string>& headerExtensions,
std::map<std::string, std::string>& includedMocs,
- std::vector<std::string>& includedUis);
+ std::map<std::string, std::string>& includedUis);
void SearchHeadersForCppFile(const std::string& absFilename,
const std::vector<std::string>& headerExtensions,
std::set<std::string>& absHeaders);
@@ -65,14 +65,14 @@ private:
void ParseHeaders(const std::set<std::string>& absHeaders,
const std::map<std::string, std::string>& includedMocs,
std::map<std::string, std::string>& notIncludedMocs,
- std::vector<std::string>& includedUis);
+ std::map<std::string, std::string>& includedUis);
void ParseForUic(const std::string& fileName,
const std::string& contentsString,
- std::vector<std::string>& includedUis);
+ std::map<std::string, std::string>& includedUis);
void ParseForUic(const std::string& fileName,
- std::vector<std::string>& includedUis);
+ std::map<std::string, std::string>& includedUis);
void Init();
diff --git a/Tests/CMakeLists.txt b/Tests/CMakeLists.txt
index 2807f97..1e04f2f 100644
--- a/Tests/CMakeLists.txt
+++ b/Tests/CMakeLists.txt
@@ -1191,6 +1191,18 @@ ${CMake_BINARY_DIR}/bin/cmake -DVERSION=master -P ${CMake_SOURCE_DIR}/Utilities/
--test-command ${CMAKE_CTEST_COMMAND} -V
)
list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4And5Automoc")
+ add_test(Qt4And5AutomocReverse ${CMAKE_CTEST_COMMAND}
+ --build-and-test
+ "${CMake_SOURCE_DIR}/Tests/Qt4And5Automoc"
+ "${CMake_BINARY_DIR}/Tests/Qt4And5AutomocReverse"
+ ${build_generator_args}
+ --build-project Qt4And5Automoc
+ --build-exe-dir "${CMake_BINARY_DIR}/Tests/Qt4And5AutomocReverse"
+ --force-new-ctest-process
+ --build-options ${build_options} -DQT_REVERSE_FIND_ORDER=1
+ --test-command ${CMAKE_CTEST_COMMAND} -V
+ )
+ list(APPEND TEST_BUILD_DIRS "${CMake_BINARY_DIR}/Tests/Qt4And5AutomocReverse")
endif()
endif()
diff --git a/Tests/Qt4And5Automoc/CMakeLists.txt b/Tests/Qt4And5Automoc/CMakeLists.txt
index 61d5743..ad74961 100644
--- a/Tests/Qt4And5Automoc/CMakeLists.txt
+++ b/Tests/Qt4And5Automoc/CMakeLists.txt
@@ -2,8 +2,13 @@ cmake_minimum_required(VERSION 2.8.12)
project(Qt4And5Automoc)
-find_package(Qt4 REQUIRED)
-find_package(Qt5Core REQUIRED)
+if (QT_REVERSE_FIND_ORDER)
+ find_package(Qt5Core REQUIRED)
+ find_package(Qt4 REQUIRED)
+else()
+ find_package(Qt4 REQUIRED)
+ find_package(Qt5Core REQUIRED)
+endif()
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
diff --git a/Tests/QtAutogen/CMakeLists.txt b/Tests/QtAutogen/CMakeLists.txt
index 515bf5b..546ed02 100644
--- a/Tests/QtAutogen/CMakeLists.txt
+++ b/Tests/QtAutogen/CMakeLists.txt
@@ -88,6 +88,6 @@ target_link_libraries(empty no_link_language)
add_library(no_link_language STATIC empty.h)
set_target_properties(no_link_language PROPERTIES AUTOMOC TRUE)
-qtx_wrap_cpp(uicOnlyMoc uiconly.h)
-add_executable(uiconly uiconly.cpp ${uicOnlyMoc})
+qtx_wrap_cpp(uicOnlyMoc sub/uiconly.h)
+add_executable(uiconly sub/uiconly.cpp ${uicOnlyMoc})
target_link_libraries(uiconly ${QT_LIBRARIES})
diff --git a/Tests/QtAutogen/uiconly.cpp b/Tests/QtAutogen/sub/uiconly.cpp
index cdb3318..cdb3318 100644
--- a/Tests/QtAutogen/uiconly.cpp
+++ b/Tests/QtAutogen/sub/uiconly.cpp
diff --git a/Tests/QtAutogen/uiconly.h b/Tests/QtAutogen/sub/uiconly.h
index 9e21f82..9e21f82 100644
--- a/Tests/QtAutogen/uiconly.h
+++ b/Tests/QtAutogen/sub/uiconly.h
diff --git a/Tests/QtAutogen/uiconly.ui b/Tests/QtAutogen/sub/uiconly.ui
index 13fb832..13fb832 100644
--- a/Tests/QtAutogen/uiconly.ui
+++ b/Tests/QtAutogen/sub/uiconly.ui