parent
8ec541ec8f
commit
78352c3f2a
@ -1,20 +1,28 @@
|
|||||||
find_package(Qt5Core REQUIRED)
|
cmake_minimum_required(VERSION 3.1.0)
|
||||||
find_package(Qt5Network REQUIRD)
|
|
||||||
|
project(lubuntuWelcomeCenter)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
|
|
||||||
|
# Find includes in corresponding build directories
|
||||||
set (SOURCES
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
main.cpp
|
# Instruct CMake to run moc automatically when needed
|
||||||
mainwindow.cpp
|
set(CMAKE_AUTOMOC ON)
|
||||||
window.cpp
|
# 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
|
||||||
)
|
)
|
||||||
|
# Tell CMake to create the helloworld executable
|
||||||
include_directory(.)
|
add_executable(lubuntuWelcomeCenter WIN32 ${lubuntuWelcomeCenter_SRCS})
|
||||||
|
# Use the Widgets module from Qt 5
|
||||||
add_executable(test ${SOURCES} )
|
target_link_libraries(lubuntuWelcomeCenter Qt5::Widgets)
|
||||||
qt5_use_modules(test Core Network)
|
|
||||||
|
|
||||||
# Should not be necessary
|
|
||||||
#CONFIG += console
|
|
||||||
#CONFIG -= app_bundle
|
|
||||||
#TEMPLATE = app
|
|
Loading…
Reference in new issue