[CMake] CMake for Qt5: Does exist set(CMAKE_AUTOUIC ON) support? or plan?

Loaden loaden at gmail.com
Thu Aug 30 11:24:51 EDT 2012


set(CMAKE_AUTOMOC ON) is great.
But for now I have to use qt5_wrap_ui macros.
e.g.

cmake_minimum_required(VERSION 2.8.9 FATAL_ERROR)
>
> project(testproject)
>
> # Find includes in corresponding build directories
> set(CMAKE_INCLUDE_CURRENT_DIR ON)
> # Instruct CMake to run moc automatically when needed
> set(CMAKE_AUTOMOC ON)
>
> # Find the QtWidgets library
> find_package(Qt5Widgets REQUIRED)
>
> # Tell CMake to create the helloworld executable
> add_executable(helloworld
>     main.cpp
>     mainwindow.cpp
>     mainwindow.ui
> )
>
> # Use the Widgets module from Qt 5
> qt5_use_modules(helloworld Widgets)
>
> # Support UI files
> qt5_wrap_ui(ui_mainwindow.h mainwindow.ui)
>
> Any help? Thanks!

-- 
Best Regards
Yuchen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120830/2b4f0f9a/attachment.htm>


More information about the CMake mailing list