parent
8ec541ec8f
commit
78352c3f2a
@ -1,20 +1,28 @@
|
||||
find_package(Qt5Core REQUIRED)
|
||||
find_package(Qt5Network REQUIRD)
|
||||
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
||||
|
||||
set (SOURCES
|
||||
main.cpp
|
||||
mainwindow.cpp
|
||||
window.cpp
|
||||
cmake_minimum_required(VERSION 3.1.0)
|
||||
|
||||
project(lubuntuWelcomeCenter)
|
||||
|
||||
# Find includes in corresponding build directories
|
||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||
# Instruct CMake to run moc automatically when needed
|
||||
set(CMAKE_AUTOMOC ON)
|
||||
# Create code from a list of Qt designer ui files
|
||||
set(CMAKE_AUTOUIC ON)
|
||||
# C++11
|
||||
set(CMAKE_CXX_STANDARD 11)
|
||||
|
||||
# Find the QtWidgets library
|
||||
find_package(Qt5Widgets CONFIG REQUIRED)
|
||||
|
||||
add_definitions(-DQT_DEPRECATED_WARNINGS)
|
||||
|
||||
# Populate a CMake variable with the sources
|
||||
set(lubuntuWelcomeCenter_SRCS
|
||||
mainwindow.ui
|
||||
mainwindow.cpp
|
||||
main.cpp
|
||||
)
|
||||
|
||||
include_directory(.)
|
||||
|
||||
add_executable(test ${SOURCES} )
|
||||
qt5_use_modules(test Core Network)
|
||||
|
||||
# Should not be necessary
|
||||
#CONFIG += console
|
||||
#CONFIG -= app_bundle
|
||||
#TEMPLATE = app
|
||||
# Tell CMake to create the helloworld executable
|
||||
add_executable(lubuntuWelcomeCenter WIN32 ${lubuntuWelcomeCenter_SRCS})
|
||||
# Use the Widgets module from Qt 5
|
||||
target_link_libraries(lubuntuWelcomeCenter Qt5::Widgets)
|
Loading…
Reference in new issue