首页 > 代码库 > Qt5 Cmake

Qt5 Cmake

project(my)cmake_minimum_required(VERSION 2.8.9)set (CMAKE_PREFIX_PATH "C:\\Qt\\Qt5.3.0\\5.3\\msvc2010_opengl")set(CMAKE_INCLUDE_CURRENT_DIR ON)find_package(Qt5Gui)find_package(Qt5Qml)find_package(Qt5Quick)aux_source_directory(. SRC)set(HEADER TestSlot.h)qt5_wrap_cpp(MOCS TestSlot.h)add_executable(${PROJECT_NAME} ${HEADER} ${SRC} ${MOCS} main.qml)qt5_use_modules(${PROJECT_NAME} Gui Qml Quick)