forked from Philip-Scott/Notes-up
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
154 lines (124 loc) · 3.51 KB
/
CMakeLists.txt
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
project(com.github.philip-scott.notes-up)
cmake_minimum_required(VERSION 2.6)
# build UI lib
list(APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
# disable C compiler warnings
add_definitions(-w)
find_package(PkgConfig)
pkg_check_modules(DEPS REQUIRED
granite>=5.2.0
gee-0.8
gtksourceview-3.0>=3.10
gthread-2.0
gtk+-3.0>=3.9.10
webkit2gtk-4.0
sqlite3>=3.5.9
gtkspell3-3.0
libmarkdown
)
set (VALA_DEPS
granite
gee-0.8
gtksourceview-3.0
gtk+-3.0
webkit2gtk-4.0
sqlite3
gtkspell3-3.0
libmarkdown
)
add_definitions(${DEPS_CFLAGS})
add_definitions(${WEBKIT_CFLAGS})
link_libraries(${DEPS_LIBRARIES})
link_libraries(${WEBKIT_LIBRARIES})
link_directories(${DEPS_LIBRARY_DIRS})
link_directories(${WEBKIT_LIBRARY_DIRS})
link_directories(${CMAKE_BINARY_DIR})
include_directories(${CMAKE_BINARY_DIR})
include_directories(${CMAKE_SOURCE_DIR})
set (generated_resources ${generated_resource})
find_package(Vala REQUIRED)
include(ValaVersion)
ensure_vala_version("0.39.0" MINIMUM)
set (DATADIR "${CMAKE_INSTALL_PREFIX}/share")
set (PKGDATADIR "${DATADIR}/notes-up")
set (GETTEXT_PACKAGE "notes-up")
set (RELEASE_NAME "TARS")
set (VERSION "2.0.0")
set (VERSION_INFO "Release")
set (PREFIX ${CMAKE_INSTALL_PREFIX})
set (DOLLAR "$")
configure_file (${CMAKE_SOURCE_DIR}/src/config.vala.cmake ${CMAKE_SOURCE_DIR}/src/config.vala)
add_definitions (-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\")
add_subdirectory (po)
add_subdirectory (schemas)
include(ValaPrecompile)
include (gresource)
set (BASIC_VALAC_OPTIONS
-g
--vapidir=${CMAKE_SOURCE_DIR}/vapi
--thread
--target-glib=2.38
)
set (GLOBAL_VALAC_OPTIONS
${BASIC_VALAC_OPTIONS}
)
SET(noele false CACHE BOOL "Remove elementaryOS-only features")
if (noele)
set (GLOBAL_VALAC_OPTIONS ${GLOBAL_VALAC_OPTIONS} --define=REMOVE_ELEMENTARY_FEATURES)
message ("-- CONTRACTOR disabled")
endif (noele)
vala_precompile(VALA_C
src/Main.vala
src/Application.vala
src/GranitePatches/SourceList.vala
src/Widgets/Editor.vala
src/Widgets/HelpBox.vala
src/Widgets/Headerbar.vala
src/Widgets/ViewEditStack.vala
src/Widgets/ToolbarButton.vala
src/Widgets/BookmarkButton.vala
src/Widgets/PageItem.vala
src/Widgets/PageInfoEditor.vala
src/Widgets/PagesList.vala
src/Widgets/Viewer.vala
src/Widgets/Window.vala
src/Widgets/Sidebar/Sidebar.vala
src/Widgets/Sidebar/SidebarItem.vala
src/Widgets/Sidebar/NotebookList.vala
src/Widgets/Sidebar/NotebookItem.vala
src/Widgets/Sidebar/BookmarkItem.vala
src/Widgets/Sidebar/TagItem.vala
src/Widgets/Sidebar/TrashItem.vala
src/Widgets/Dialogs/NewNotebookDialog.vala
src/Widgets/Dialogs/PreferencesDialog.vala
src/Widgets/Dialogs/NotebookListDialog.vala
src/Services/Bookmark.vala
src/Services/FileManager.vala
src/Services/Notebook.vala
src/Services/Image.vala
src/Services/Page.vala
src/Services/Settings.vala
src/Services/StyleLoader.vala
src/Services/Trash.vala
src/Services/Tags.vala
src/Services/DatabaseTable.vala
src/Services/WordWrapper.vala
src/Plugins/Manager.vala
src/Plugins/Plugin.vala
src/Plugins/Break.vala
src/Plugins/Color.vala
src/Plugins/Youtube.vala
src/Plugins/Image.vala
src/Plugins/PageLink.vala
src/Plugins/Highlight.vala
src/config.vala
PACKAGES
${VALA_DEPS}
OPTIONS
${GLOBAL_VALAC_OPTIONS}
)
add_subdirectory (data)
glib_compile_resources(generated_resources SOURCE data/assets.gresource.xml)
add_executable(com.github.philip-scott.notes-up ${VALA_C} ${generated_resources})
install(TARGETS com.github.philip-scott.notes-up RUNTIME
DESTINATION bin)