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
|
project (writer)
cmake_minimum_required (VERSION 2.8)
cmake_policy (VERSION 2.6)
list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake/vala)
enable_testing ()
set (DATADIR "${CMAKE_INSTALL_PREFIX}/share")
set (PKGDATADIR "${DATADIR}/writer")
set (GETTEXT_PACKAGE "writer")
set (RELEASE_NAME "Writer")
set (VERSION "0.1")
set (VERSION_INFO "Release")
set (CMAKE_C_FLAGS "-ggdb")
set (PREFIX ${CMAKE_INSTALL_PREFIX})
set (DOLLAR "$")
list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
# Some configuration
configure_file (${CMAKE_SOURCE_DIR}/src/config.vala.cmake ${CMAKE_SOURCE_DIR}/src/config.vala)
add_definitions(-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\")
# Vala
find_package (Vala REQUIRED)
include (ValaVersion)
ensure_vala_version ("0.26" MINIMUM)
include (ValaPrecompile)
# Add 'make dist' command for creating release tarball
set (CPACK_PACKAGE_VERSION ${VERSION})
set (CPACK_SOURCE_GENERATOR "TGZ")
set (CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}-${CPACK_PACKAGE_VERSION}")
set (CPACK_SOURCE_IGNORE_FILES "/build/;/.bzr/;/.bzrignore;~$;${CPACK_SOURCE_IGNORE_FILES}")
include (CPack)
add_custom_target (dist COMMAND ${CMAKE_MAKE_PROGRAM} package_source)
find_package(PkgConfig)
pkg_check_modules(DEPS REQUIRED granite gtk+-3.0)
add_definitions(${DEPS_CFLAGS})
link_libraries(${DEPS_LIBRARIES})
link_directories(${DEPS_LIBRARY_DIRS})
find_package(Vala REQUIRED)
include(ValaVersion)
ensure_vala_version("0.26.0" MINIMUM)
include(ValaPrecompile)
vala_precompile(VALA_C
BugFixAchive.vala
src/Utils/Document.vala
src/Utils/FileChooser.vala
src/Utils/Stylesheet.vala
src/Utils/TextEditor.vala
src/Utils/TextRange.vala
src/Utils/ZeitgeistLogger.vala
src/Widgets/ButtonGroup.vala
src/Widgets/EditorView.vala
src/Widgets/ImageToolBar.vala
src/Widgets/TableChooser.vala
src/Widgets/TableToolBar.vala
src/Widgets/TextToolBar.vala
src/Widgets/TitleBar.vala
src/Widgets/ToolBar.vala
src/Widgets/WelcomeView.vala
src/config.vala
src/MainWindow.vala
src/Writer.vala
PACKAGES
gtk+-3.0
granite
OPTIONS
--thread
--vapidir=${CMAKE_CURRENT_SOURCE_DIR}/vapi/
)
add_subdirectory (data)
add_subdirectory (po)
add_executable (writer ${VALA_C})
install (TARGETS writer RUNTIME DESTINATION bin)
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/writer.desktop DESTINATION share/applications)
IF (EXISTS (${CMAKE_CURRENT_SOURCE_DIR}/data/writer.svg))
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/writer.svg DESTINATION share/icons/hicolor/48x48/apps)
ENDIF ()
|