summaryrefslogtreecommitdiffstats
path: root/Tests/RunCMake/Ninja/Qt5AutoMocDeps.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/RunCMake/Ninja/Qt5AutoMocDeps.cmake')
-rw-r--r--Tests/RunCMake/Ninja/Qt5AutoMocDeps.cmake8
1 files changed, 8 insertions, 0 deletions
diff --git a/Tests/RunCMake/Ninja/Qt5AutoMocDeps.cmake b/Tests/RunCMake/Ninja/Qt5AutoMocDeps.cmake
index 7456608..46b840f 100644
--- a/Tests/RunCMake/Ninja/Qt5AutoMocDeps.cmake
+++ b/Tests/RunCMake/Ninja/Qt5AutoMocDeps.cmake
@@ -8,6 +8,14 @@ add_library(simple_lib SHARED simple_lib.cpp)
add_executable(app_with_qt app.cpp app_qt.cpp)
target_link_libraries(app_with_qt PRIVATE simple_lib Qt5::Core)
+if(Qt5Widgets_DIR)
+ find_package(Qt5Widgets REQUIRED)
+ qt5_wrap_ui(_headers MyWindow.ui)
+ add_executable(app_with_widget app.cpp MyWindow.cpp ${_headers})
+ target_link_libraries(app_with_widget PRIVATE Qt5::Widgets)
+ target_include_directories(app_with_widget PRIVATE "${CMAKE_BINARY_DIR}")
+endif()
+
add_subdirectory(QtSubDir1)
add_subdirectory(QtSubDir2)
add_subdirectory(QtSubDir3)