forked from p-e-w/finalterm
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
99 lines (86 loc) · 2.8 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
project(finalterm)
cmake_minimum_required(VERSION 2.8)
cmake_policy(VERSION 2.6)
list(APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
set(DATADIR "${CMAKE_INSTALL_PREFIX}/share")
set(PKGDATADIR "${DATADIR}/finalterm")
set(VERSION 0.1)
set(GETTEXT_PACKAGE "finalterm")
set(CMAKE_C_FLAGS "-ggdb")
set(DOLLAR "$")
set(VALAFLAGS "")
configure_file(${CMAKE_SOURCE_DIR}/src/Config.vala.cmake ${CMAKE_BINARY_DIR}/src/Config.vala)
configure_file(${CMAKE_SOURCE_DIR}/data/Startup/bash_startup ${CMAKE_BINARY_DIR}/Startup/bash_startup)
set(PKGS clutter-gtk-1.0 mx-1.0 keybinder-3.0)
find_package(PkgConfig)
# see if we got libunity
pkg_check_modules(UNITY unity)
if (UNITY_FOUND)
set(VALAFLAGS ${VALAFLAGS}
--define=HAS_UNITY)
set(PKGS ${PKGS}
gee-1.0 unity)
else (UNITY_FOUND)
set(PKGS ${PKGS}
gee-0.8)
endif (UNITY_FOUND)
# see if we got libnotify
pkg_check_modules(NOTIFY libnotify)
if (NOTIFY_FOUND)
set(VALAFLAGS ${VALAFLAGS}
--define=HAS_NOTIFY)
set(PKGS ${PKGS}
libnotify)
endif (NOTIFY_FOUND)
pkg_check_modules(DEPS REQUIRED ${PKGS})
add_definitions(${DEPS_CFLAGS})
add_definitions(-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\")
link_libraries(${DEPS_LIBRARIES})
link_directories(${DEPS_LIBRARY_DIRS})
find_package(Vala REQUIRED)
include(ValaVersion)
ensure_vala_version("0.16.0" MINIMUM)
include(ValaPrecompile)
vala_precompile(VALA_C
src/FinalTerm.vala
src/Terminal.vala
src/TerminalStream.vala
src/TerminalOutput.vala
src/CharacterAttributes.vala
src/TerminalView.vala
src/LineView.vala
src/Autocompletion.vala
src/NotifyingList.vala
src/ScrollableListView.vala
src/Utilities.vala
src/SettingsWindow.vala
src/TextMenu.vala
src/ColorScheme.vala
src/Theme.vala
src/KeyBindings.vala
src/Command.vala
src/Settings.vala
src/Metrics.vala
${CMAKE_BINARY_DIR}/src/Config.vala
PACKAGES
${PKGS}
posix
linux
OPTIONS
-g
--vapidir=${CMAKE_CURRENT_SOURCE_DIR}/vapi/
${VALAFLAGS}
)
include(GSettings)
add_schema ("data/org.gnome.finalterm.gschema.xml")
add_executable(finalterm ${VALA_C})
target_link_libraries(finalterm m util)
install(TARGETS finalterm RUNTIME DESTINATION bin)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/finalterm.desktop DESTINATION share/applications)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/ColorSchemes DESTINATION share/finalterm)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/KeyBindings DESTINATION share/finalterm)
install(DIRECTORY ${CMAKE_BINARY_DIR}/Startup DESTINATION share/finalterm)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/Termlets DESTINATION share/finalterm USE_SOURCE_PERMISSIONS)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/TextMenus DESTINATION share/finalterm)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/Themes DESTINATION share/finalterm)
install(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/data/Icons/hicolor DESTINATION share/icons)