-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
109 lines (74 loc) · 3.46 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
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
CMAKE_MINIMUM_REQUIRED ( VERSION 3.6 )
PROJECT ( QasTools
VERSION 0.24.0
LANGUAGES CXX )
# Build type
SET ( CMAKE_BUILD_TYPE "Release" CACHE STRING "CMake build type" )
SET ( BUILD_LIST "qascommon,qasconfig,qashctl,qasmixer" CACHE STRING
"List of parts to build" )
# program/package/version suffix
SET ( PROGRAM_SUFFIX "" CACHE STRING "Program suffix" )
SET ( VERSION_SUFFIX "" CACHE STRING "Version suffix" )
SET ( PACKAGE_SUFFIX "" CACHE STRING "Package suffix" )
# Package name
SET ( PACKAGE_TITLE "QasTools" CACHE STRING "Package title" )
SET ( PACKAGE_NAME "qastools${PACKAGE_SUFFIX}" CACHE STRING "Package name" )
# Package version
SET ( PACKAGE_VERSION_MAJOR "${PROJECT_VERSION_MAJOR}" )
SET ( PACKAGE_VERSION_MINOR "${PROJECT_VERSION_MINOR}" )
SET ( PACKAGE_VERSION_PATCH "${PROJECT_VERSION_PATCH}" )
SET ( PACKAGE_VERSION
"${PACKAGE_VERSION_MAJOR}.${PACKAGE_VERSION_MINOR}.${PACKAGE_VERSION_PATCH}${VERSION_SUFFIX}" )
# Installation directories
SET ( INSTALL_DIR_BIN "bin" CACHE STRING
"Installation directory for binaries" )
SET ( INSTALL_DIR_MAN "share/man/man1" CACHE STRING
"Installation directory for manpages" )
SET ( INSTALL_DIR_APPSTREAM "share/metainfo" CACHE STRING
"Installation directory for AppStream metadata" )
SET ( INSTALL_DIR_DESKTOP "share/applications" CACHE STRING
"Installation directory for desktop files" )
SET ( INSTALL_DIR_DATA "share/${PACKAGE_NAME}" CACHE STRING
"Installation directory for application data" )
SET ( INSTALL_DIR_L10N "${INSTALL_DIR_DATA}/l10n" CACHE STRING
"Installation directory for localization files" )
SET ( INSTALL_DIR_APP_ICONS "${INSTALL_DIR_DATA}/icons" CACHE STRING
"Installation directory for application icons" )
SET ( INSTALL_DIR_WIDGETS_GRAPHICS "${INSTALL_DIR_DATA}/widgets" CACHE STRING
"Installation directory for widget graphics" )
# Icon installation directories
SET ( INSTALL_DIR_ICONS_PNG_16 "share/icons/hicolor/16x16/apps" CACHE STRING
"Installation directory for application icons (16x16)" )
SET ( INSTALL_DIR_ICONS_PNG_32 "share/icons/hicolor/32x32/apps" CACHE STRING
"Installation directory for application icons (32x32)" )
SET ( INSTALL_DIR_ICONS_PNG_48 "share/icons/hicolor/48x48/apps" CACHE STRING
"Installation directory for application icons (48x48)" )
SET ( INSTALL_DIR_ICONS_PNG_64 "share/icons/hicolor/64x64/apps" CACHE STRING
"Installation directory for application icons (64x64)" )
SET ( INSTALL_DIR_ICONS_SVG "share/icons/hicolor/scalable/apps" CACHE STRING
"Installation directory for application icons (scalable)" )
# Localization file prefix
SET ( L10N_PREFIX "${PACKAGE_NAME}_" )
# Shared resources
SET ( SHARED_RES_DIR "${CMAKE_CURRENT_SOURCE_DIR}/shared" )
SET ( SHARED_SRC_DIR "${SHARED_RES_DIR}/src" )
SET ( SHARED_INC_DIR "${SHARED_RES_DIR}/src" )
# Installation
IF ( NOT SKIP_LICENSE_INSTALL )
INSTALL( FILES "COPYING"
DESTINATION ${INSTALL_DIR_DATA} )
ENDIF ( NOT SKIP_LICENSE_INSTALL )
# Process subdirectories
IF ( ${BUILD_LIST} MATCHES "qascommon" )
ADD_SUBDIRECTORY ( i18n )
ADD_SUBDIRECTORY ( shared )
ENDIF ( ${BUILD_LIST} MATCHES "qascommon" )
IF ( ${BUILD_LIST} MATCHES "qasconfig" )
ADD_SUBDIRECTORY ( qasconfig )
ENDIF ( ${BUILD_LIST} MATCHES "qasconfig" )
IF ( ${BUILD_LIST} MATCHES "qashctl" )
ADD_SUBDIRECTORY ( qashctl )
ENDIF ( ${BUILD_LIST} MATCHES "qashctl" )
IF ( ${BUILD_LIST} MATCHES "qasmixer" )
ADD_SUBDIRECTORY ( qasmixer )
ENDIF ( ${BUILD_LIST} MATCHES "qasmixer" )