~l-admin-3/pantheon-maps/trunk

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
project (pantheon-maps)
cmake_minimum_required (VERSION 2.8)
cmake_policy (VERSION 2.6)

set (DATADIR "${CMAKE_INSTALL_PREFIX}/share/pantheon-maps")
set (PKGDATADIR "${DATADIR}/pantheon-maps")
set (GETTEXT_PACKAGE "pantheon-maps")
set (RELEASE_NAME "pantheon-maps")
set (VERSION "0.1")
set (VERSION_INFO "Release")
set (PREFIX ${CMAKE_INSTALL_PREFIX})
set (DOLLAR "$")

list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)

file(GLOB_RECURSE sources src/*.vala)

configure_file (${CMAKE_SOURCE_DIR}/src/config.vala.cmake ${CMAKE_SOURCE_DIR}/src/config.vala)

find_package (Vala REQUIRED)
include (ValaVersion)
ensure_vala_version ("0.18" MINIMUM)
include (ValaPrecompile)

add_definitions (-DGETTEXT_PACKAGE="pantheon-maps")

find_package(PkgConfig)
pkg_check_modules(DEPS REQUIRED granite gtk+-3.0 gthread-2.0 gio-2.0 clutter-gtk-1.0 geocode-glib-1.0 champlain-0.12)
add_definitions(${DEPS_CFLAGS})
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/config.vala
    src/maps.vala
    src/MainWindow.vala
    src/SettingsManager.vala
    src/Widgets/TitleBar.vala
    src/Widgets/Information.vala
    src/Widgets/MainView.vala
    src/Widgets/Map.vala
    src/Widgets/Marker.vala
    src/Widgets/ZoomControl.vala
    src/Dialogs/PreferencesDialog.vala
PACKAGES
    gtk+-3.0
    gio-2.0
    granite
    clutter-gtk-1.0
    geocode-glib-1.0
    champlain-0.12
OPTIONS
    --thread
)

add_subdirectory (po)

add_executable(pantheon-maps ${VALA_C})

include(GSettings)
add_schema("org.pantheon.maps.gschema.xml")

install (TARGETS pantheon-maps RUNTIME DESTINATION bin)

install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/pantheon-maps.desktop DESTINATION share/applications)

install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/MarkerRed.svg DESTINATION "${PKGDATADIR}")
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/MarkerGreen.svg DESTINATION "${PKGDATADIR}")
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/MarkerLightGreen.svg DESTINATION "${PKGDATADIR}")
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/MarkerBlue.svg DESTINATION "${PKGDATADIR}")

#install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/128/pantheon-maps.svg DESTINATION share/icons/hicolor/128x128/apps)
#install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/64/pantheon-maps.svg DESTINATION share/icons/hicolor/64x64/apps)
#install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/48/pantheon-maps.svg DESTINATION share/icons/hicolor/48x48/apps)