我已经从 ubuntu-developers 存储库(我在 Ubuntu 13.04 下)安装了 Qt5 和 Qt3d,我想用 CMake 编译一个非常简单的应用程序(我的版本是 2.8.10.1)。Qt helloworld 的工作 CMakeLists.txt 如下:
cmake_minimum_required(VERSION 2.8.8)
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)
# Tell CMake to create the helloworld executable
add_executable(helloworld helloworld.cpp)
# Use the Widgets module from Qt 5.
qt5_use_modules(helloworld Widgets)
但是像这个例子这样的基本 Qt3d 程序的 CMakeLists.txt 是什么: https ://gitorious.org/wiki-sources/wiki-sources/trees/master/qt3d/glview