commit Update CMakeLists.txt to include Hello World example

master
Samuel Banya 6 years ago
parent 8ec541ec8f
commit 78352c3f2a

@ -1,20 +1,28 @@
find_package(Qt5Core REQUIRED) cmake_minimum_required(VERSION 3.1.0)
find_package(Qt5Network REQUIRD)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x") project(lubuntuWelcomeCenter)
set (SOURCES # Find includes in corresponding build directories
main.cpp set(CMAKE_INCLUDE_CURRENT_DIR ON)
mainwindow.cpp # Instruct CMake to run moc automatically when needed
window.cpp 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)
include_directory(.) # Find the QtWidgets library
find_package(Qt5Widgets CONFIG REQUIRED)
add_executable(test ${SOURCES} ) add_definitions(-DQT_DEPRECATED_WARNINGS)
qt5_use_modules(test Core Network)
# Should not be necessary # Populate a CMake variable with the sources
#CONFIG += console set(lubuntuWelcomeCenter_SRCS
#CONFIG -= app_bundle mainwindow.ui
#TEMPLATE = app mainwindow.cpp
main.cpp
)
# 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…
Cancel
Save