c++ - CMake with Qt3d for Qt5? -
i have installed qt5 , qt3d ubuntu-developers repository (i'm under ubuntu 13.04) , compile simple application cmake (my version 2.8.10.1). working cmakelists.txt qt helloworld following :
cmake_minimum_required(version 2.8.8) project(testproject) # find includes in corresponding build directories set(cmake_include_current_dir on) # instruct cmake run moc automatically when needed. set(cmake_automoc on) # find qtwidgets library find_package(qt5widgets) # tell cmake create helloworld executable add_executable(helloworld helloworld.cpp) # use widgets module qt 5. qt5_use_modules(helloworld widgets) but cmakelists.txt of basic qt3d program example : https://gitorious.org/wiki-sources/wiki-sources/trees/master/qt3d/glview
qt3d regular qt module, qt widgets. should add qt3d project widgets:
cmake_minimum_required(version 2.8.8) project(testproject) set(cmake_include_current_dir on) set(cmake_automoc on) find_package(qt5widgets) find_package(qt53d) add_executable(helloworld teapotview.cpp main.cpp) qt5_use_modules(helloworld widgets 3d) i've tested cmakelists.txt teapot example. it's available here. note example you've posted written qt4 , not work qt5.
i've used ubuntu 13.04 qt3d5-dev package available in main repository.
Comments
Post a Comment