Switched to CMake

This commit is contained in:
Luca D'Amico 2020-12-07 14:14:34 +01:00
parent d0d4138d3f
commit a3e006fa2f
6 changed files with 51 additions and 61 deletions

42
CMakeLists.txt Normal file
View File

@ -0,0 +1,42 @@
cmake_minimum_required(VERSION 3.18)
project(NDSFactory)
find_package(Qt5Core REQUIRED)
find_package(Qt5Gui REQUIRED)
find_package(Qt5Widgets REQUIRED)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(SOURCES
main.cpp
mainwindow.cpp
ndsfactory.cpp
aboutdialog.cpp
unpackertabfunctions.cpp
unpackertabsignals.cpp
packertabsignals.cpp
packertabfunctions.cpp
fatpatchingtabsignals.cpp
fatpatchingtabfunctions.cpp
)
SET(HEADERS
mainwindow.h
ndsheader.h
ndsfactory.h
aboutdialog.h
fatstruct.h
crctable.h
)
set(FORMS
mainwindow.ui
aboutdialog.ui
)
add_executable(${PROJECT_NAME} ${SOURCES} ${HEADERS} ${FORMS})
target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::Gui Qt5::Widgets)

View File

@ -1,54 +0,0 @@
#-------------------------------------------------
#
# Project created by QtCreator 2019-08-29T12:15:45
#
#-------------------------------------------------
QT += core gui
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
TARGET = NDSFactory
TEMPLATE = app
# The following define makes your compiler emit warnings if you use
# any feature of Qt which has been marked as deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS
# You can also make your code fail to compile if you use deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000 # disables all the APIs deprecated before Qt 6.0.0
CONFIG += c++11
SOURCES += \
main.cpp \
mainwindow.cpp \
ndsfactory.cpp \
aboutdialog.cpp \
unpackertabfunctions.cpp \
unpackertabsignals.cpp \
packertabsignals.cpp \
packertabfunctions.cpp \
fatpatchingtabsignals.cpp \
fatpatchingtabfunctions.cpp
HEADERS += \
mainwindow.h \
ndsheader.h \
ndsfactory.h \
aboutdialog.h \
fatstruct.h \
crctable.h
FORMS += \
mainwindow.ui \
aboutdialog.ui
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

View File

@ -10,12 +10,12 @@ class AboutDialog;
class AboutDialog : public QDialog
{
Q_OBJECT
public:
AboutDialog(QWidget *parent = nullptr);
~AboutDialog();
public:
AboutDialog(QWidget *parent = nullptr);
~AboutDialog();
private:
Ui::AboutDialog *ui;
private:
Ui::AboutDialog *ui;
};

View File

@ -1,6 +1,7 @@
#include <QApplication>
#include "mainwindow.h"
#include "aboutdialog.h"
#include "ui_mainwindow.h"
#include "aboutdialog.h"
MainWindow::MainWindow(QWidget *parent) :
QMainWindow(parent),

View File

@ -3,6 +3,7 @@
#include "mainwindow.h"
#include "ui_mainwindow.h"
void MainWindow::on_packerLoadHeaderBtn_clicked()
{
std::vector<char> romHeader;

View File

@ -3,7 +3,6 @@
#include <cstring>
#include <sstream>
#include <iomanip>
#include "mainwindow.h"
#include "ui_mainwindow.h"
@ -219,4 +218,5 @@ bool MainWindow::dumpEverything(QString dirPath)
bool MainWindow::decodeFatFiles()
{
// TODO: implement me!
return false;
}