project qtest cmake_minimum_requir ed VERSION find_package Qt5Widgets

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
project(qtest)
cmake_minimum_required(VERSION 2.8)
find_package(Qt5Widgets REQUIRED)
include_directories(${Qt5Widgets_INCLUDES})
add_definitions(${Qt5Widgets_DEFINITIONS})
set(CMAKE_CXX_FLAGS "${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
aux_source_directory(. SRC_LIST)
add_executable(${PROJECT_NAME} ${SRC_LIST})
target_link_libraries(qtest ${Qt5Widgets_LIBRARIES})