2
cmake_minimum_required (VERSION 2.8)
3
cmake_policy (VERSION 2.6)
5
set (DATADIR "${CMAKE_INSTALL_PREFIX}/share/writer")
6
set (PKGDATADIR "${DATADIR}/writer")
7
set (GETTEXT_PACKAGE "writer")
8
set (RELEASE_NAME "Writer")
10
set (VERSION_INFO "Release")
11
set (PREFIX ${CMAKE_INSTALL_PREFIX})
14
list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
16
file(GLOB_RECURSE sources src/*.vala)
19
configure_file (${CMAKE_SOURCE_DIR}/src/config.vala.cmake ${CMAKE_SOURCE_DIR}/src/config.vala)
22
find_package (Vala REQUIRED)
24
ensure_vala_version ("0.18" MINIMUM)
25
include (ValaPrecompile)
28
add_definitions (-DGETTEXT_PACKAGE="writer")
30
find_package(PkgConfig)
31
pkg_check_modules(DEPS REQUIRED granite gtk+-3.0 gthread-2.0)
32
add_definitions(${DEPS_CFLAGS})
33
link_libraries(${DEPS_LIBRARIES})
34
link_directories(${DEPS_LIBRARY_DIRS})
36
find_package(Vala REQUIRED)
38
ensure_vala_version("0.16.0" MINIMUM)
40
include(ValaPrecompile)
41
vala_precompile(VALA_C
44
src/Widgets/TitleBar.vala
45
src/Widgets/WelcomeView.vala
56
add_executable(writer ${VALA_C})
58
install (TARGETS writer RUNTIME DESTINATION bin)
59
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/writer.desktop DESTINATION share/applications)
60
IF (EXISTS (${CMAKE_CURRENT_SOURCE_DIR}/data/writer.svg))
61
install (FILES ${CMAKE_CURRENT_SOURCE_DIR}/data/writer.svg DESTINATION share/icons/hicolor/48x48/apps)