WSL/SLF GitLab Repository

Commit 6a7180aa authored by Mathias Bavay's avatar Mathias Bavay
Browse files

Finally, porting Inishell from qmake to cmake!

This is issue 869 and is required for several reasons: 1) to make Inishell more
similar to MeteoIO, Snowpack, etc 2) because Qt6 is moving to CMake in
replacement of qmake 3) because it will "easily" allow creating native packages
for several platforms.
parent ee91c803
......@@ -25,4 +25,5 @@ tags
#profiling:
callgrind.out.*
massif.out.*
#Cmake temporary files
CMakeFiles/*
CMAKE_MINIMUM_REQUIRED(VERSION 3.1.0)
PROJECT(inishell VERSION 2.0.7)
SET(CMAKE_CXX_STANDARD 11)
SET(CMAKE_CXX_STANDARD_REQUIRED True)
CONFIGURE_FILE(${PROJECT_SOURCE_DIR}/src/main/config.h.in ${PROJECT_SOURCE_DIR}/src/main/config.h)
SET(CMAKE_CXX_STANDARD 11)
SET(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
IF(CMAKE_VERSION VERSION_LESS "3.7.0")
SET(CMAKE_INCLUDE_CURRENT_DIR ON)
ENDIF()
FIND_PACKAGE(Qt5 COMPONENTS Widgets Xml XmlPatterns REQUIRED)
SET(QT5_LIBRARIES Qt5::Widgets Qt5::Xml Qt5::XmlPatterns)
SET(TARGET ${CMAKE_PROJECT_NAME})
SET(EXTRA_LIBS_SRC
./lib/tinyexpr.c
)
SET(PANELS_SRC
./src/panels/Number.cc
./src/panels/Atomic.cc
./src/panels/Copytext.cc
./src/panels/dynamic_panels.cc
./src/panels/panels.cc
./src/panels/Group.cc
./src/panels/FilePath.cc
./src/panels/Selector.cc
./src/panels/Helptext.cc
./src/panels/GridPanel.cc
./src/panels/ImageView.cc
./src/panels/Checklist.cc
./src/panels/Replicator.cc
./src/panels/Checkbox.cc
./src/panels/Spacer.cc
./src/panels/HorizontalPanel.cc
./src/panels/Datepicker.cc
./src/panels/Textfield.cc
./src/panels/Choice.cc
./src/panels/Label.cc
./src/panels/Dropdown.cc
)
SET(GUI_SRC
./src/gui/WorkflowPanel.cc
./src/gui/PreviewWindow.cc
./src/gui/AboutWindow.cc
./src/gui/TerminalView.cc
./src/gui/IniFolderView.cc
./src/gui/ApplicationsView.cc
./src/gui/SectionButton.cc
./src/gui/RememberDialog.cc
./src/gui/PathView.cc
./src/gui/HelpWindow.cc
./src/gui/Logger.cc
./src/gui/SettingsWindow.cc
./src/gui/MainPanel.cc
./src/gui/PreviewEdit.cc
./src/gui/MainWindow.cc
./src/gui/SectionTab.cc
)
SET(MAIN_SRC
./src/main/XMLReader.cc
./src/main/INIParser.cc
./src/main/dimensions.cc
./src/main/settings.cc
./src/main/common.cc
./src/main/Error.cc
./src/main/expressions.cc
./src/main/inishell.cc
./src/main/SyntaxHighlighter.cc
./src/main/os.cc
./src/main/main.cc
./src/main/colors.cc
)
SET(RESOURCES
resources/inishell.qrc
)
INCLUDE_DIRECTORIES("${PROJECT_SOURCE_DIR}/")
SET(SOURCES ${EXTRA_LIBS_SRC} ${PANELS_SRC} ${GUI_SRC} ${MAIN_SRC} ${RESOURCES})
ADD_EXECUTABLE(${TARGET} ${SOURCES})
TARGET_LINK_LIBRARIES(${TARGET} ${QT5_LIBRARIES})
......@@ -16,10 +16,10 @@
along with INIshell. If not, see <http://www.gnu.org/licenses/>.
*/
#include "AboutWindow.h"
#include "src/main/common.h"
#include "src/main/constants.h"
#include "src/main/inishell.h"
#include <src/gui/AboutWindow.h>
#include <src/main/common.h>
#include <src/main/constants.h>
#include <src/main/inishell.h>
#include <QKeySequence>
#include <QFile>
......
......@@ -21,9 +21,9 @@
* list of suitable XML files, be it applications or simulations.
*/
#include "ApplicationsView.h"
#include "src/main/inishell.h"
#include "src/main/settings.h"
#include <src/gui/ApplicationsView.h>
#include <src/main/inishell.h>
#include <src/main/settings.h>
#include <QAction>
#include <QDesktopServices>
......
......@@ -16,10 +16,10 @@
along with INIshell. If not, see <http://www.gnu.org/licenses/>.
*/
#include "AboutWindow.h"
#include "HelpWindow.h"
#include "src/main/inishell.h"
#include "src/main/XMLReader.h"
#include <src/gui/AboutWindow.h>
#include <src/gui/HelpWindow.h>
#include <src/main/inishell.h>
#include <src/main/XMLReader.h>
#include <QCoreApplication>
#include <QDesktopServices>
......
......@@ -27,9 +27,9 @@
#include <QMainWindow>
#include <QString>
#include "src/gui/MainPanel.h"
#include "src/gui/SectionTab.h"
#include "src/panels/Group.h"
#include <src/gui/MainPanel.h>
#include <src/gui/SectionTab.h>
#include <src/panels/Group.h>
class HelpWindow : public QMainWindow {
Q_OBJECT
......
......@@ -16,11 +16,11 @@
along with INIshell. If not, see <http://www.gnu.org/licenses/>.
*/
#include "IniFolderView.h"
#include "src/main/common.h"
#include "src/main/constants.h"
#include "src/main/inishell.h"
#include "src/main/settings.h"
#include <src/gui/IniFolderView.h>
#include <src/main/common.h>
#include <src/main/constants.h>
#include <src/main/inishell.h>
#include <src/main/settings.h>
#include <QCursor>
#include <QDesktopServices>
......
......@@ -16,12 +16,12 @@
along with INIshell. If not, see <http://www.gnu.org/licenses/>.
*/
#include "Logger.h"
#include "src/main/colors.h"
#include "src/main/common.h"
#include "src/main/Error.h"
#include "src/main/inishell.h"
#include "src/main/settings.h"
#include <src/gui/Logger.h>
#include <src/main/colors.h>
#include <src/main/common.h>
#include <src/main/Error.h>
#include <src/main/inishell.h>
#include <src/main/settings.h>
#include <QCoreApplication>
#include <QDateTime>
......
......@@ -16,17 +16,17 @@
along with INIshell. If not, see <http://www.gnu.org/licenses/>.
*/
#include "MainPanel.h"
#include "SectionButton.h"
#include "WorkflowPanel.h"
#include "src/main/colors.h"
#include "src/main/constants.h"
#include "src/main/inishell.h"
#include "src/main/os.h"
#include "src/main/settings.h"
#include "src/main/XMLReader.h"
#include "src/panels/dynamic_panels.h"
#include "src/panels/panels.h"
#include <src/gui/MainPanel.h>
#include <src/gui/SectionButton.h>
#include <src/gui/WorkflowPanel.h>
#include <src/main/colors.h>
#include <src/main/constants.h>
#include <src/main/inishell.h>
#include <src/main/os.h>
#include <src/main/settings.h>
#include <src/main/XMLReader.h>
#include <src/panels/dynamic_panels.h>
#include <src/panels/panels.h>
#include <QGroupBox>
#include <QHBoxLayout>
......
......@@ -26,9 +26,9 @@
#ifndef MAINPANEL_H
#define MAINPANEL_H
#include "SectionTab.h"
#include "src/gui/WorkflowPanel.h"
#include "src/panels/panels.h"
#include <src/gui/SectionTab.h>
#include <src/gui/WorkflowPanel.h>
#include <src/panels/panels.h>
#include <QList>
#include <QStackedWidget>
......
......@@ -21,21 +21,21 @@
* 2019-10
*/
#include "MainWindow.h"
#include "RememberDialog.h"
#include "src/gui/AboutWindow.h"
#include "src/main/colors.h"
#include "src/main/common.h"
#include "src/main/constants.h"
#include "src/main/Error.h"
#include "src/main/dimensions.h"
#include "src/main/INIParser.h"
#include "src/main/inishell.h"
#include "src/main/settings.h"
#include "src/main/XMLReader.h"
#include "src/panels/Atomic.h"
#include "src/panels/dynamic_panels.h"
#include "src/panels/Group.h" //to exclude Groups from panel search
#include <src/gui/MainWindow.h>
#include <src/gui/RememberDialog.h>
#include <src/gui/AboutWindow.h>
#include <src/main/colors.h>
#include <src/main/common.h>
#include <src/main/constants.h>
#include <src/main/Error.h>
#include <src/main/dimensions.h>
#include <src/main/INIParser.h>
#include <src/main/inishell.h>
#include <src/main/settings.h>
#include <src/main/XMLReader.h>
#include <src/panels/Atomic.h>
#include <src/panels/dynamic_panels.h>
#include <src/panels/Group.h> //to exclude Groups from panel search
#include <QApplication>
#include <QCheckBox>
......
......@@ -25,13 +25,13 @@
#ifndef MAINWINDOW_H
#define MAINWINDOW_H
#include "Logger.h"
#include "src/gui/HelpWindow.h"
#include "src/gui/MainPanel.h"
#include "src/gui/PreviewWindow.h"
#include "src/gui/SettingsWindow.h"
#include "src/main/constants.h"
#include "src/main/INIParser.h"
#include <src/gui/Logger.h>
#include <src/gui/HelpWindow.h>
#include <src/gui/MainPanel.h>
#include <src/gui/PreviewWindow.h>
#include <src/gui/SettingsWindow.h>
#include <src/main/constants.h>
#include <src/main/INIParser.h>
#include <QAction>
#include <QCheckBox>
......
......@@ -16,8 +16,8 @@
along with INIshell. If not, see <http://www.gnu.org/licenses/>.
*/
#include "PathView.h"
#include "src/main/constants.h"
#include <src/gui/PathView.h>
#include <src/main/constants.h>
#include <QDir>
#include <QVBoxLayout>
......
......@@ -16,8 +16,8 @@
along with INIshell. If not, see <http://www.gnu.org/licenses/>.
*/
#include "PreviewEdit.h"
#include "src/main/colors.h"
#include <src/gui/PreviewEdit.h>
#include <src/main/colors.h>
#include <QDir>
#include <QFontMetrics>
......
......@@ -24,7 +24,7 @@
#ifndef PREVIEWEDIT_H
#define PREVIEWEDIT_H
#include "src/main/SyntaxHighlighter.h"
#include <src/main/SyntaxHighlighter.h>
#include <QAction>
#include <QString>
......
......@@ -16,13 +16,13 @@
along with INIshell. If not, see <http://www.gnu.org/licenses/>.
*/
#include "PreviewWindow.h"
#include "RememberDialog.h"
#include "src/main/colors.h"
#include "src/main/common.h"
#include "src/main/os.h"
#include "src/main/inishell.h"
#include "src/main/settings.h"
#include <src/gui/PreviewWindow.h>
#include <src/gui/RememberDialog.h>
#include <src/main/colors.h>
#include <src/main/common.h>
#include <src/main/os.h>
#include <src/main/inishell.h>
#include <src/main/settings.h>
#include <QClipboard>
#include <QCoreApplication>
......
......@@ -24,9 +24,9 @@
#ifndef PREVIEWWINDOW_H
#define PREVIEWWINDOW_H
#include "src/main/INIParser.h"
#include "src/main/colors.h"
#include "src/gui/PreviewEdit.h"
#include <src/main/INIParser.h>
#include <src/main/colors.h>
#include <src/gui/PreviewEdit.h>
#include <QAction>
#include <QLineEdit>
......
......@@ -16,9 +16,9 @@
along with INIshell. If not, see <http://www.gnu.org/licenses/>.
*/
#include "RememberDialog.h"
#include "src/main/colors.h"
#include "src/main/settings.h"
#include <src/gui/RememberDialog.h>
#include <src/main/colors.h>
#include <src/main/settings.h>
#include <QCheckBox>
#include <QCoreApplication>
......
......@@ -16,8 +16,8 @@
along with INIshell. If not, see <http://www.gnu.org/licenses/>.
*/
#include "SectionButton.h"
#include "src/main/inishell.h"
#include <src/gui/SectionButton.h>
#include <src/main/inishell.h>
#include <QHBoxLayout>
#include <QToolButton>
......
......@@ -16,15 +16,15 @@
along with INIshell. If not, see <http://www.gnu.org/licenses/>.
*/
#include "RememberDialog.h"
#include "SectionTab.h"
#include "SectionButton.h"
#include "src/main/colors.h"
#include "src/main/inishell.h"
#include "src/main/os.h"
#include "src/main/settings.h"
#include "src/main/XMLReader.h"
#include "src/panels/Group.h"
#include <src/gui/RememberDialog.h>
#include <src/gui/SectionTab.h>
#include <src/gui/SectionButton.h>
#include <src/main/colors.h>
#include <src/main/inishell.h>
#include <src/main/os.h>
#include <src/main/settings.h>
#include <src/main/XMLReader.h>
#include <src/panels/Group.h>
/**
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment