From 22d1b57a4855457a130aac46434647d7aac20f32 Mon Sep 17 00:00:00 2001 From: Muaz Ahmad Date: Thu, 4 May 2023 15:31:09 +0500 Subject: [PATCH] converted to proper directory structure --- .gitignore | 2 ++ 3dobj-renderer.pro | 14 +++++++------- mainwindow.ui => forms/mainwindow.ui | 0 obj.h => include/obj.h | 0 opglwidget.h => include/opglwidget.h | 0 main.cpp => src/main.cpp | 2 +- obj.cpp => src/obj.cpp | 2 +- opglwidget.cpp => src/opglwidget.cpp | 2 +- 8 files changed, 12 insertions(+), 10 deletions(-) rename mainwindow.ui => forms/mainwindow.ui (100%) rename obj.h => include/obj.h (100%) rename opglwidget.h => include/opglwidget.h (100%) rename main.cpp => src/main.cpp (93%) rename obj.cpp => src/obj.cpp (98%) rename opglwidget.cpp => src/opglwidget.cpp (99%) diff --git a/.gitignore b/.gitignore index 8b722c0..596739e 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,5 @@ ui_mainwindow.h untitled.mtl untitled.obj moc* +build/ +bin/ diff --git a/3dobj-renderer.pro b/3dobj-renderer.pro index ff5b075..f61cec8 100644 --- a/3dobj-renderer.pro +++ b/3dobj-renderer.pro @@ -4,10 +4,6 @@ TEMPLATE = app TARGET = 3dobj-renderer -INCLUDEPATH += . \ - /usr/include/GL -DEPENDPATH += . \ - /usr/include/GL # You can make your code fail to compile if you use deprecated APIs. # In order to do so, uncomment the following line. @@ -17,7 +13,11 @@ DEPENDPATH += . \ #DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0 # Input -SOURCES += main.cpp opglwidget.cpp obj.cpp -HEADERS += ui_mainwindow.h opglwidget.h obj.h -FORMS += mainwindow.ui +SOURCES += src/main.cpp src/opglwidget.cpp src/obj.cpp +HEADERS += include/opglwidget.h include/obj.h +FORMS += forms/mainwindow.ui +MOC_DIR += build/moc +UI_DIR += include/ +OBJECTS_DIR += build/objects QT += core gui widgets +DESTDIR = $$PWD/bin diff --git a/mainwindow.ui b/forms/mainwindow.ui similarity index 100% rename from mainwindow.ui rename to forms/mainwindow.ui diff --git a/obj.h b/include/obj.h similarity index 100% rename from obj.h rename to include/obj.h diff --git a/opglwidget.h b/include/opglwidget.h similarity index 100% rename from opglwidget.h rename to include/opglwidget.h diff --git a/main.cpp b/src/main.cpp similarity index 93% rename from main.cpp rename to src/main.cpp index 223bfad..b9945c2 100644 --- a/main.cpp +++ b/src/main.cpp @@ -1,7 +1,7 @@ #include #include #include -#include "ui_mainwindow.h" +#include "include/ui_mainwindow.h" int main(int argc, char **argv) { QApplication app(argc, argv); diff --git a/obj.cpp b/src/obj.cpp similarity index 98% rename from obj.cpp rename to src/obj.cpp index 38f26bc..62832b2 100644 --- a/obj.cpp +++ b/src/obj.cpp @@ -1,4 +1,4 @@ -#include "obj.h" +#include "include/obj.h" #include #include #include diff --git a/opglwidget.cpp b/src/opglwidget.cpp similarity index 99% rename from opglwidget.cpp rename to src/opglwidget.cpp index 4d42347..ad038f2 100644 --- a/opglwidget.cpp +++ b/src/opglwidget.cpp @@ -1,4 +1,4 @@ -#include "opglwidget.h" +#include "include/opglwidget.h" #include #include #include