WSL/SLF GitLab Repository

CMakeLists.txt 2.94 KB
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
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})
Mathias Bavay's avatar
Mathias Bavay committed
94
95
96
97
98
SET_TARGET_PROPERTIES(${TARGET} PROPERTIES
	RUNTIME_OUTPUT_DIRECTORY "${PROJECT_SOURCE_DIR}/bin"
	CLEAN_DIRECT_OUTPUT 1
	OUTPUT_NAME ${TARGET})
INSTALL(TARGETS ${TARGET} RUNTIME DESTINATION bin COMPONENT exe)
99

Mathias Bavay's avatar
Mathias Bavay committed
100
101
102
103
104
105
106
107
ADD_CUSTOM_TARGET(distclean make clean
	COMMAND cmake -E remove CMakeCache.txt CPackSourceConfig.cmake CPackConfig.cmake CTestTestfile.cmake DartConfiguration.tcl cmake_install.cmake cmake_uninstall.cmake install_manifest.txt Makefile
	COMMAND cmake -E remove bin/inishell bin/inishell.*
	COMMAND cmake -E remove */CMakeCache.txt */CTestTestfile.cmake */cmake_install.cmake
	COMMAND cmake -E remove */*/CMakeCache.txt */*/CTestTestfile.cmake */*/cmake_install.cmake
	COMMAND cmake -E remove_directory CMakeFiles
	COMMAND cmake -E remove_directory build/tmp/obj tmp/obj inishell_autogen
)