From 372de398eae42dd5dd30f7bf56e80ebf27ecc9e5 Mon Sep 17 00:00:00 2001 From: Samuel Banya Date: Thu, 25 Oct 2018 20:18:23 -0400 Subject: [PATCH] commit Attempt to port all files to CMake using example: https://stackoverflow.com/questions/43763416/how-to-convert-qmake-to-cmake --- CMakeLists.txt | 20 ++ lubuntuWelcomeCenter.pro | 4 +- lubuntuWelcomeCenter.pro.user | 355 +--------------------------------- mainwindow.h | 4 + window.h | 4 + 5 files changed, 32 insertions(+), 355 deletions(-) create mode 100644 CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..d2511a1 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,20 @@ +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 +) + +include_directory(.) + +add_executable(test ${SOURCES} ) +qt5_use_modules(test Core Network) + +# Should not be necessary +#CONFIG += console +#CONFIG -= app_bundle +#TEMPLATE = app diff --git a/lubuntuWelcomeCenter.pro b/lubuntuWelcomeCenter.pro index 24341c4..da5c024 100644 --- a/lubuntuWelcomeCenter.pro +++ b/lubuntuWelcomeCenter.pro @@ -19,11 +19,11 @@ # #------------------------------------------------- -QT += core gui +QT += core gui network greaterThan(QT_MAJOR_VERSION, 4): QT += widgets -TARGET = SubclassingQWidget +TARGET = SubclassingQWidget test TEMPLATE = app # The following define makes your compiler emit warnings if you use diff --git a/lubuntuWelcomeCenter.pro.user b/lubuntuWelcomeCenter.pro.user index bfa5e6f..ae669e8 100644 --- a/lubuntuWelcomeCenter.pro.user +++ b/lubuntuWelcomeCenter.pro.user @@ -1,355 +1,4 @@ - - - - - - EnvironmentId - {3ad3f86a-0ba2-40ce-ad95-b88db7dc70bf} - - - ProjectExplorer.Project.ActiveTarget - 0 - - - ProjectExplorer.Project.EditorSettings - - true - false - true - - Cpp - - CppGlobal - - - - QmlJS - - QmlJSGlobal - - - 2 - UTF-8 - false - 4 - false - 80 - true - true - 1 - true - false - 0 - true - true - 0 - 8 - true - 1 - true - true - true - false - - - - ProjectExplorer.Project.PluginSettings - - - true - - - - ProjectExplorer.Project.Target.0 - - Desktop Qt 5.11.2 GCC 64bit - Desktop Qt 5.11.2 GCC 64bit - qt.qt5.5112.gcc_64_kit - 0 - 0 - 0 - - /home/sam/scripts/phabricator/build-lubuntuWelcomeCenter-Desktop_Qt_5_11_2_GCC_64bit-Debug - - - true - qmake - - QtProjectManager.QMakeBuildStep - true - - false - false - false - - - true - Make - - Qt4ProjectManager.MakeStep - - -w - -r - - false - - - - 2 - Build - - ProjectExplorer.BuildSteps.Build - - - - true - Make - - Qt4ProjectManager.MakeStep - - -w - -r - - true - clean - - - 1 - Clean - - ProjectExplorer.BuildSteps.Clean - - 2 - false - - Debug - Debug - Qt4ProjectManager.Qt4BuildConfiguration - 2 - true - - - /home/sam/scripts/phabricator/build-lubuntuWelcomeCenter-Desktop_Qt_5_11_2_GCC_64bit-Release - - - true - qmake - - QtProjectManager.QMakeBuildStep - false - - false - false - true - - - true - Make - - Qt4ProjectManager.MakeStep - - -w - -r - - false - - - - 2 - Build - - ProjectExplorer.BuildSteps.Build - - - - true - Make - - Qt4ProjectManager.MakeStep - - -w - -r - - true - clean - - - 1 - Clean - - ProjectExplorer.BuildSteps.Clean - - 2 - false - - Release - Release - Qt4ProjectManager.Qt4BuildConfiguration - 0 - true - - - /home/sam/scripts/phabricator/build-lubuntuWelcomeCenter-Desktop_Qt_5_11_2_GCC_64bit-Profile - - - true - qmake - - QtProjectManager.QMakeBuildStep - true - - false - true - true - - - true - Make - - Qt4ProjectManager.MakeStep - - -w - -r - - false - - - - 2 - Build - - ProjectExplorer.BuildSteps.Build - - - - true - Make - - Qt4ProjectManager.MakeStep - - -w - -r - - true - clean - - - 1 - Clean - - ProjectExplorer.BuildSteps.Clean - - 2 - false - - Profile - Profile - Qt4ProjectManager.Qt4BuildConfiguration - 0 - true - - 3 - - - 0 - Deploy - - ProjectExplorer.BuildSteps.Deploy - - 1 - Deploy Configuration - - ProjectExplorer.DefaultDeployConfiguration - - 1 - - - false - false - 1000 - - true - - false - false - false - false - true - 0.01 - 10 - true - 1 - 25 - - 1 - true - false - true - valgrind - - 0 - 1 - 2 - 3 - 4 - 5 - 6 - 7 - 8 - 9 - 10 - 11 - 12 - 13 - 14 - - 2 - - lubuntuWelcomeCenter - lubuntuWelcomeCenter2 - Qt4ProjectManager.Qt4RunConfiguration:/home/sam/scripts/phabricator/lubuntu-welcome-center/lubuntuWelcomeCenter.pro - true - - lubuntuWelcomeCenter.pro - - /home/sam/scripts/phabricator/build-lubuntuWelcomeCenter-Desktop_Qt_5_11_2_GCC_64bit-Debug - 3768 - false - true - false - false - true - - 1 - - - - ProjectExplorer.Project.TargetCount - 1 - - - ProjectExplorer.Project.Updater.FileVersion - 18 - - - Version - 18 - - + + diff --git a/mainwindow.h b/mainwindow.h index d08ed26..ae98e1c 100644 --- a/mainwindow.h +++ b/mainwindow.h @@ -18,6 +18,10 @@ #include +SOURCES += main.cpp \ + mainWindow.cpp \ + window.cpp + namespace Ui { class MainWindow; } diff --git a/window.h b/window.h index 793f7c8..1d01d0c 100644 --- a/window.h +++ b/window.h @@ -18,6 +18,10 @@ #include +SOURCES += main.cpp \ + mainwindow.cpp \ + window.cpp + class QPushButton; class Window : public QWidget {