qt5base-lts/tests/manual/cmake/pass3/CMakeLists.txt
Stephen Kelly c7f8042064 Pass the tests when run in visual studio.
Make sure the name of the project corresponds to the project name
passed to try_compile so that the .sln files are created.

Change-Id: Ifee24ac4ab6a16a538bdf7fb32ea252eb1ba436a
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
2011-12-01 17:46:57 +01:00

19 lines
505 B
CMake

cmake_minimum_required(VERSION 2.8)
project(pass3)
find_package(Qt5Core REQUIRED)
find_package(Qt5Gui REQUIRED)
find_package(Qt5Widgets REQUIRED)
include_directories(${Qt5Core_INCLUDE_DIRS} ${Qt5Gui_INCLUDE_DIRS} ${Qt5Widgets_INCLUDE_DIRS})
set(CMAKE_INCLUDE_CURRENT_DIR ON)
qt5_wrap_cpp(moc_files mywidget.h)
qt5_wrap_ui(ui_files mywidget.ui)
add_executable(mywidget mywidget.cpp ${moc_files} ${ui_files})
target_link_libraries(mywidget ${Qt5Core_LIBRARY} ${Qt5Gui_LIBRARY} ${Qt5Widgets_LIBRARY})