summaryrefslogtreecommitdiff
path: root/src/CMakeLists.txt
blob: b3b8ed32bef60d4a907f18966555e7711e350f78 (plain)
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
################################################################
# Actually compile the executable
################################################################

# determine source and header files
file(GLOB VALA_SRC RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.vala */*.vala)

if (${INDICATOR_FOUND})
  SET(DEFINES --define HAVE_APPINDICATOR)
endif(${INDICATOR_FOUND})

if (${GMENU3_FOUND})
    LIST(APPEND DEFINES --define HAVE_GMENU_3)
endif (${GMENU3_FOUND})

# use valac to compile sources to c files
vala_precompile(
    VALA_C
        ${VALA_SRC}
    PACKAGES
        ${VALA_PKGS}
    OPTIONS
        --vapidir=${CMAKE_SOURCE_DIR}/vapi/
        --thread
        ${DEFINES}
)

# compile c-sources
add_executable(gnome-pie ${VALA_C})

# install executable
install(
	TARGETS
		gnome-pie
	RUNTIME DESTINATION
		${CMAKE_INSTALL_PREFIX}/bin
)

# install credits
install(
	FILES
		${CMAKE_SOURCE_DIR}/README
	DESTINATION
		${CMAKE_INSTALL_PREFIX}/share/doc/gnome-pie
)

# install locales
install(
	DIRECTORY
		${CMAKE_SOURCE_DIR}/resources/locale
	DESTINATION
		${CMAKE_INSTALL_PREFIX}/share
	PATTERN *.po EXCLUDE
	PATTERN *.pot EXCLUDE
	PATTERN *.sh EXCLUDE
)

# install themes
install(
	DIRECTORY
		${CMAKE_SOURCE_DIR}/resources/themes
	DESTINATION
		${CMAKE_INSTALL_PREFIX}/share/gnome-pie
)

# install icons
install(
	FILES
		${CMAKE_SOURCE_DIR}/resources/gnome-pie.svg
		${CMAKE_SOURCE_DIR}/resources/gnome-pie-indicator.svg
	DESTINATION
		${CMAKE_INSTALL_PREFIX}/share/icons/hicolor/scalable/apps
)

# desktop file
install(
	FILES
		${CMAKE_SOURCE_DIR}/resources/gnome-pie.desktop
	DESTINATION
		${CMAKE_INSTALL_PREFIX}/share/applications
)