Skip to content

Instantly share code, notes, and snippets.

@richin13
Created October 11, 2015 02:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save richin13/f0f71c2264c85652fea2 to your computer and use it in GitHub Desktop.
Save richin13/f0f71c2264c85652fea2 to your computer and use it in GitHub Desktop.
cmake_minimum_required(VERSION 3.3)
project(TestQt)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_AUTOMOC ON)
set(SOURCE_FILES ui/main.cpp ui/mainwindow.cpp ui/mainwindow.h ui/ui_mainwindow.h ui/dialog.cpp ui/dialog.h ui/ui_dialog.h networking/TestNet.cpp networking/TestNet.h database/TestSql.cpp database/TestSql.h)
add_executable(TestQt ${SOURCE_FILES})
find_package(Qt5Core REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5Gui REQUIRED)
find_package(Qt5Network REQUIRED)
find_package(Qt5Sql REQUIRED)
qt5_use_modules(TestQt Core Widgets Gui Network Sql)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment