mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-04 12:49:36 -06:00
Autogen: Add AUTOUIC_SEARCH_PATHS test
This commit is contained in:
committed by
Brad King
parent
1cdf7c1be2
commit
6d7c02db34
@@ -286,6 +286,10 @@ if (NOT QT_TEST_VERSION STREQUAL 4)
|
|||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
# -- Test
|
||||||
|
# Tests various .ui include directories
|
||||||
|
add_subdirectory(uicInclude)
|
||||||
|
|
||||||
# -- Test
|
# -- Test
|
||||||
# Complex test case
|
# Complex test case
|
||||||
add_subdirectory(complex)
|
add_subdirectory(complex)
|
||||||
|
|||||||
8
Tests/QtAutogen/uicInclude/CMakeLists.txt
Normal file
8
Tests/QtAutogen/uicInclude/CMakeLists.txt
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Test moc include patterns
|
||||||
|
|
||||||
|
set(CMAKE_AUTOUIC_SEARCH_PATHS "dirA")
|
||||||
|
|
||||||
|
add_executable(uicInclude main.cpp)
|
||||||
|
target_link_libraries(uicInclude ${QT_LIBRARIES})
|
||||||
|
set_target_properties(uicInclude PROPERTIES AUTOUIC ON)
|
||||||
|
set_property(TARGET uicInclude APPEND PROPERTY AUTOUIC_SEARCH_PATHS "dirB")
|
||||||
24
Tests/QtAutogen/uicInclude/PageC.ui
Normal file
24
Tests/QtAutogen/uicInclude/PageC.ui
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>PageC</class>
|
||||||
|
<widget class="QWidget" name="PageC">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>400</width>
|
||||||
|
<height>300</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QTreeView" name="treeView"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
24
Tests/QtAutogen/uicInclude/dirA/PageA.ui
Normal file
24
Tests/QtAutogen/uicInclude/dirA/PageA.ui
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>PageA</class>
|
||||||
|
<widget class="QWidget" name="PageA">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>400</width>
|
||||||
|
<height>300</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QTreeView" name="treeView"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
24
Tests/QtAutogen/uicInclude/dirB/sub/PageB.ui
Normal file
24
Tests/QtAutogen/uicInclude/dirB/sub/PageB.ui
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<ui version="4.0">
|
||||||
|
<class>PageB</class>
|
||||||
|
<widget class="QWidget" name="PageB">
|
||||||
|
<property name="geometry">
|
||||||
|
<rect>
|
||||||
|
<x>0</x>
|
||||||
|
<y>0</y>
|
||||||
|
<width>400</width>
|
||||||
|
<height>300</height>
|
||||||
|
</rect>
|
||||||
|
</property>
|
||||||
|
<property name="windowTitle">
|
||||||
|
<string>Form</string>
|
||||||
|
</property>
|
||||||
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
|
<item>
|
||||||
|
<widget class="QTreeView" name="treeView"/>
|
||||||
|
</item>
|
||||||
|
</layout>
|
||||||
|
</widget>
|
||||||
|
<resources/>
|
||||||
|
<connections/>
|
||||||
|
</ui>
|
||||||
10
Tests/QtAutogen/uicInclude/main.cpp
Normal file
10
Tests/QtAutogen/uicInclude/main.cpp
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
|
||||||
|
#include "main.hpp"
|
||||||
|
|
||||||
|
int main(int argv, char** args)
|
||||||
|
{
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#include "sub/ui_PageB.h"
|
||||||
|
#include "ui_PageC.h"
|
||||||
6
Tests/QtAutogen/uicInclude/main.hpp
Normal file
6
Tests/QtAutogen/uicInclude/main.hpp
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#ifndef MAIN_HPP
|
||||||
|
#define MAIN_HPP
|
||||||
|
|
||||||
|
#include "ui_PageA.h"
|
||||||
|
|
||||||
|
#endif
|
||||||
Reference in New Issue
Block a user