2011-12-06 19:24:06 +00:00
|
|
|
|
|
|
|
cmake_minimum_required(VERSION 2.8)
|
|
|
|
|
|
|
|
project("pass(needsquoting)6")
|
|
|
|
|
|
|
|
find_package(Qt5Core REQUIRED)
|
|
|
|
find_package(Qt5Gui REQUIRED)
|
|
|
|
find_package(Qt5Widgets REQUIRED)
|
|
|
|
|
|
|
|
include_directories(${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS})
|
|
|
|
|
2012-02-10 15:40:12 +00:00
|
|
|
add_definitions(${Qt5Core_DEFINITIONS})
|
|
|
|
|
2011-12-06 19:24:06 +00:00
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
|
|
|
|
qt5_wrap_cpp(moc_files mywidget.h)
|
|
|
|
qt5_wrap_ui(ui_files mywidget.ui)
|
|
|
|
|
2012-02-21 11:06:54 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
|
|
|
|
|
2011-12-06 19:24:06 +00:00
|
|
|
add_executable(mywidget mywidget.cpp ${moc_files} ${ui_files})
|
|
|
|
target_link_libraries(mywidget ${Qt5Widgets_LIBRARIES})
|