forked from ubports/docviewer-app
-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
55 lines (45 loc) · 1.66 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
project(com.ubuntu.docviewer C CXX)
cmake_minimum_required(VERSION 2.8.9)
set(UBUNTU_MANIFEST_PATH "click/manifest.json.in" CACHE INTERNAL "Relative path to the manifest file")
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/modules")
set(CMAKE_AUTOMOC ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -fno-permissive -pedantic -Wall -Wextra -fPIC")
# Debugging purpose. Keep commented unless you need it.
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_DEBUG}")
include(FindPkgConfig)
include(GNUInstallDirs)
option(INSTALL_TESTS "Install the tests on make install" on)
option(CLICK_MODE "Installs to a contained location" on)
option(NO_CACHE "Disable caching of click dependencies (CLICK_MODE only)" off)
set(APP_NAME ubuntu-docviewer-app)
set(DESKTOP_FILE "${PROJECT_NAME}.desktop")
set(LP_PROJECT ubuntu-docviewer-app)
set(ICON_FILE docviewer-app.png)
set(AUTOPILOT_DIR ubuntu_docviewer_app)
# Sets GIT_REVNO
execute_process(
COMMAND git rev-list --first-parent --all --count
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}
OUTPUT_VARIABLE GIT_REVNO
OUTPUT_STRIP_TRAILING_WHITESPACE
)
# Find out the architecture for package building
# to determine the plugin's installation path
execute_process(
COMMAND dpkg-architecture -qDEB_HOST_MULTIARCH
OUTPUT_VARIABLE ARCH_TRIPLET
OUTPUT_STRIP_TRAILING_WHITESPACE
)
execute_process(
COMMAND dpkg-architecture -qDEB_HOST_ARCH
OUTPUT_VARIABLE CLICK_ARCH
OUTPUT_STRIP_TRAILING_WHITESPACE
)
include(Click)
# Tests
enable_testing()
add_subdirectory(po)
add_subdirectory(click)
add_subdirectory(data)
add_subdirectory(src)
add_subdirectory(tests)