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
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to