-
Notifications
You must be signed in to change notification settings - Fork 6
/
CMakeLists.txt
143 lines (116 loc) · 5.66 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
project (eradio)
cmake_minimum_required (VERSION 2.6)
list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
set(GETTEXT_PACKAGE ${CMAKE_PROJECT_NAME})
add_definitions("-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\"")
add_definitions("-w")
set (HOMEDIR $ENV{HOME})
set (HOME_DATADIR ${HOMEDIR}/.local/share/eradio)
set (DATADIR "${CMAKE_INSTALL_PREFIX}/share")
set (PKGDATADIR "${DATADIR}/eradio")
set (PKG_DATADIR ${PKGDATADIR})
set (EXEC_NAME "com.github.dreamdevel.eradio")
set (RELEASE_NAME "eRadio")
set (VERSION "2.0.1")
set (CONFIG_FILE ${CMAKE_CURRENT_SOURCE_DIR}/src/config.vala)
set (CONFIG_FILE_REL src/config.vala)
configure_file (${CMAKE_CURRENT_SOURCE_DIR}/src/config.vala.cmake ${CONFIG_FILE})
include (GSettings)
add_schema ("schemas/com.dreamdevel.eradio.gschema.xml")
find_package(PkgConfig)
set (PROJECT_DEPS
gstreamer-1.0
gtk+-3.0
granite
sqlite3
gee-0.8
libnotify
json-glib-1.0
libsoup-2.4
libxml-2.0
sqlheavy-0.1
)
pkg_check_modules(DEPS REQUIRED ${PROJECT_DEPS})
add_definitions(${DEPS_CFLAGS})
link_libraries(${DEPS_LIBRARIES} m)
link_directories(${DEPS_LIBRARY_DIRS})
find_package(Vala REQUIRED)
include(ValaVersion)
ensure_vala_version("0.24" MINIMUM)
include(ValaPrecompile)
vala_precompile(VALA_C ${EXEC_NAME}
${CONFIG_FILE_REL}
src/main.vala
src/radio.vala
src/error.vala
src/package_manager.vala
src/Enums/PlayerStatus.vala
src/Enums/ListStoreFilterType.vala
src/Models/Genre.vala
src/Models/Station.vala
src/Models/WebRadio.vala
src/Core/Database.vala
src/Core/Player.vala
src/Core/PlayerHelper.vala
src/Core/MPRIS.vala
src/Core/MediaKeyListener.vala
src/Core/Notifier.vala
src/Core/Settings.vala
src/Core/DatabaseModels/GenreModel.vala
src/Core/DatabaseModels/StationModel.vala
src/Core/DatabaseModels/StationsGenresModel.vala
src/Core/PlayerDecoders/M3UDecoder.vala
src/Core/PlayerDecoders/PLSDecoder.vala
src/Core/PlayerDecoders/ASXDecoder.vala
src/Core/WidgetManager.vala
src/UserInterface/Menus/ApplicationMenu.vala
src/UserInterface/Menus/StationsTreeViewContextMenu.vala
src/UserInterface/Views/WelcomeView.vala
src/UserInterface/Views/StationsListView.vala
src/UserInterface/Widgets/HeaderBar.vala
src/UserInterface/Widgets/SideBar.vala
src/UserInterface/Widgets/ViewStack.vala
src/UserInterface/Widgets/StationsListStore.vala
src/UserInterface/Widgets/GenresListStore.vala
src/UserInterface/Widgets/StationsTreeView.vala
src/UserInterface/Widgets/StationsTreeViewScrollable.vala
src/UserInterface/Widgets/GenresTreeView.vala
src/UserInterface/Widgets/GenresTreeViewScrollable.vala
src/UserInterface/Widgets/GenresTreeViewToolbar.vala
src/UserInterface/Widgets/SideBarExpandableItem.vala
src/UserInterface/Widgets/LevelBar.vala
src/UserInterface/Widgets/DiscoverBox.vala
src/UserInterface/Widgets/MainStack.vala
src/UserInterface/Dialogs/StationDialog.vala
src/UserInterface/Dialogs/AddStationDialog.vala
src/UserInterface/Dialogs/EditStationDialog.vala
src/UserInterface/Dialogs/ErrorDialog.vala
src/UserInterface/Dialogs/ProgressDialog.vala
src/UserInterface/Dialogs/ImportProgressDialog.vala
src/UserInterface/Others/FileChooserCreator.vala
src/UserInterface/Windows/MainWindow.vala
PACKAGES
${PROJECT_DEPS}
OPTIONS
--enable-experimental
)
add_subdirectory (po)
add_executable(${EXEC_NAME} ${VALA_C})
install (TARGETS ${EXEC_NAME} RUNTIME DESTINATION bin)
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/com.github.dreamdevel.eradio.desktop DESTINATION ${DATADIR}/applications/)
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/com.github.dreamdevel.eradio.appdata.xml DESTINATION ${DATADIR}/metainfo/)
set(SYSTEM_DEFAULT_THEME ${CMAKE_INSTALL_PREFIX}/share/icons/hicolor)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/images/discoverBig.png DESTINATION ${PKGDATADIR})
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/images/icons/16x16/apps/com.github.dreamdevel.eradio.png DESTINATION ${SYSTEM_DEFAULT_THEME}/16x16/apps)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/images/icons/24x24/apps/com.github.dreamdevel.eradio.png DESTINATION ${SYSTEM_DEFAULT_THEME}/24x24/apps)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/images/icons/32x32/apps/com.github.dreamdevel.eradio.png DESTINATION ${SYSTEM_DEFAULT_THEME}/32x32/apps)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/images/icons/48x48/apps/com.github.dreamdevel.eradio.png DESTINATION ${SYSTEM_DEFAULT_THEME}/48x48/apps)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/images/icons/128x128/apps/com.github.dreamdevel.eradio.png DESTINATION ${SYSTEM_DEFAULT_THEME}/128x128/apps)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/images/icons/256x256/apps/com.github.dreamdevel.eradio.png DESTINATION ${SYSTEM_DEFAULT_THEME}/256x256/apps)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/images/icons/512x512/apps/com.github.dreamdevel.eradio.png DESTINATION ${SYSTEM_DEFAULT_THEME}/512x512/apps)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/images/icons/16x16/apps/eradio-all-stations.svg DESTINATION ${SYSTEM_DEFAULT_THEME}/16x16/apps)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/images/icons/16x16/apps/eradio-favorites.svg DESTINATION ${SYSTEM_DEFAULT_THEME}/16x16/apps)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/images/icons/16x16/apps/eradio-genre.svg DESTINATION ${SYSTEM_DEFAULT_THEME}/16x16/apps)
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/images/icons/16x16/apps/eradio-discover.svg DESTINATION ${SYSTEM_DEFAULT_THEME}/16x16/apps)
install(CODE "execute_process(COMMAND \"gtk-update-icon-cache\" \"-f\" \"/usr/share/icons/hicolor/\")")
install(CODE "execute_process(COMMAND \"xdg-mime\" \"default\" \"com.github.dreamdevel.eradio.desktop\" \"x-scheme-handler/webradio\")")