2011-12-06 19:24:06 +00:00
|
|
|
|
|
|
|
cmake_minimum_required(VERSION 2.8)
|
|
|
|
|
2012-06-22 08:04:05 +00:00
|
|
|
project("test(needsquoting)dirname")
|
2011-12-06 19:24:06 +00:00
|
|
|
|
|
|
|
find_package(Qt5Widgets REQUIRED)
|
|
|
|
|
2013-03-14 13:08:12 +00:00
|
|
|
include_directories(${Qt5Widgets_INCLUDE_DIRS})
|
2011-12-06 19:24:06 +00:00
|
|
|
|
2013-03-14 13:08:12 +00:00
|
|
|
add_definitions(${Qt5Widgets_DEFINITIONS})
|
2012-02-10 15:40:12 +00:00
|
|
|
|
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-04-27 14:17:22 +00:00
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
|
2012-02-21 11:06:54 +00:00
|
|
|
|
2011-12-06 19:24:06 +00:00
|
|
|
add_executable(mywidget mywidget.cpp ${moc_files} ${ui_files})
|
2012-04-27 14:17:22 +00:00
|
|
|
target_link_libraries(mywidget ${Qt5Widgets_LIBRARIES})
|