-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathCMakeLists.txt
86 lines (70 loc) · 2.81 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
project (go-for-it)
cmake_minimum_required (VERSION 2.8.9)
# tell cmake where its modules can be found in our project directory
list (APPEND CMAKE_MODULE_PATH ${CMAKE_SOURCE_DIR}/cmake)
include (GNUInstallDirs)
# where we install data directory (if we have any)
set (INSTALL_PREFIX "${CMAKE_INSTALL_PREFIX}")
set (DATADIR "${INSTALL_PREFIX}/share")
set (RESOURCE_PATH "/go-for-it")
set (APP_ID "com.github.jmoerman.go-for-it" CACHE STRING "The application id.")
set (APP_SYSTEM_NAME ${APP_ID} CACHE STRING "Name to used for file names. For example the file name of the .desktop file.")
set (SCHEMA_PATH "/com/github/jmoerman/go-for-it" CACHE STRING "The gsettings schema path.")
set (PKGDATADIR ${DATADIR}/${APP_SYSTEM_NAME})
set (FILE_CONF ${PROJECT_NAME}.conf)
set (EXEC_NAME ${APP_SYSTEM_NAME})
set (APP_NAME "Go For It!")
set (RELEASE_NAME "A stylish to-do list with built-in productivity timer")
set (VERSION "1.8.4")
set (VERSION_INFO "Release")
set (ICON_NAME ${APP_SYSTEM_NAME})
set (GETTEXT_PACKAGE ${APP_SYSTEM_NAME})
set (APIVERSION 0)
set (LIBNAME ${APP_SYSTEM_NAME}-${APIVERSION})
set (LIBVERSION "0")
set (SOVERSION 0)
# The path where library files should be searched for
set (LIBRARY_PATH "src")
set (PROJECT_WEBSITE "http://manuel-kehl.de/projects/go-for-it/")
set (PROJECT_REPO "https://github.com/JMoerman/Go-For-It")
set (PROJECT_DONATIONS "https://jmoerman.github.io/donate/")
set (DEFAULT_THEME "elementary")
#for go-for-it.pc.cmake
set (PREFIX ${CMAKE_INSTALL_PREFIX})
set (DOLLAR "$")
# find pkgconfig to make sure dependencies are installed
find_package (PkgConfig)
# check for the required dependencies
pkg_check_modules (DEPS REQUIRED
gtk+-3.0>=3.14.0
glib-2.0>=2.40
libnotify
)
add_definitions(${DEPS_CFLAGS})
link_directories(${DEPS_LIBRARY_DIRS})
include_directories(${CMAKE_BINARY_DIR}/src)
find_program (INTLTOOL_MERGE_EXECUTABLE intltool-merge)
if (NOT INTLTOOL_MERGE_EXECUTABLE)
message ( FATAL_ERROR "Couldn't find the intltool-merge executable. Please make sure intltool is installed and try again")
endif ()
# disable c compiler warnings
add_definitions (-w)
add_definitions (-DGETTEXT_PACKAGE=\"${GETTEXT_PACKAGE}\")
# make sure we have vala
find_package (Vala REQUIRED)
# make sure we use vala
include (ValaVersion)
# make sure it's the desired version of vala
ensure_vala_version("0.36.15" MINIMUM)
option (BUILD_TESTS "Build a unit test executable." OFF)
option (ICON_UPDATE "Run gtk-update-icon-cache after the install." ON)
# Options for when information like this is best shown elsewere
option (NO_CONTRIBUTE_DIALOG "Do not include the contribute dialog." OFF)
option (SHOW_ABOUT "Show the about action in the .desktop and menu." ON)
add_subdirectory (src)
add_subdirectory (executable)
if (BUILD_TESTS)
add_subdirectory (tests)
endif (BUILD_TESTS)
add_subdirectory (data)
add_subdirectory (po)