Skip to content

Instantly share code, notes, and snippets.

@maaaks
Last active August 29, 2015 13:57
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 maaaks/9578772 to your computer and use it in GitHub Desktop.
Save maaaks/9578772 to your computer and use it in GitHub Desktop.
Default CMakeLists.txt for a Qt project
project(AAAAAAAAAAAAAAAAAAAAAAAA)
cmake_minimum_required(VERSION 2.8.9)
add_definitions(-std=c++11 -fPIC)
find_package(Qt5Widgets)
include_directories(${QT_INCLUDES})
file(GLOB_RECURSE H "*.h")
file(GLOB_RECURSE CPP "*.cpp")
file(GLOB_RECURSE UI "*.ui")
file(GLOB_RECURSE QRC "*.qrc")
set(CMAKE_AUTOMOC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
qt5_wrap_ui(UI ${UI})
qt5_add_resources(QRC ${QRC})
add_executable(AAAAAAAAAAAAAAAAAAAAAAAA main.cpp ${H} ${CPP} ${UI} ${QRC})
qt5_use_modules(AAAAAAAAAAAAAAAAAAAAAAAA Widgets)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment