blob: b4a5b4877a8d22b3259893711662c6eabb2b1224 (
plain)
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
|
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
PROJECT(privacy-setting C)
INCLUDE(FindPkgConfig)
STRING(REGEX MATCH "([^.]*)" SO_VERSION "${VERSION}")
# Set compiler flags
SET(CMAKE_C_FLAGS_RELEASE "-O2 -Wall")
SET(CMAKE_C_FLAGS_DEBUG "-O0 -Wall -g -ggdb")
SET(CMAKE_C_FLAGS_CCOV "-O2 -Wall --coverage")
ADD_DEFINITIONS("-Werror") # Make all warnings into errors.
ADD_DEFINITIONS("-Wall") # Generate all warnings
ADD_DEFINITIONS("-Wextra") # Generate even more extra warnings
ADD_DEFINITIONS("-Wno-unused-parameter") # Ignore unused parameter
ADD_DEFINITIONS("-Wno-unused-function")
ADD_DEFINITIONS("-Wno-unused-variable")
# Set linker flags
SET(CMAKE_SHARED_LINKER_FLAGS "-Wl,--as-needed")
SET(CMAKE_EXE_LINKER_FLAGS "-Wl,--as-needed -pie")
SET(PREFIX ${CMAKE_INSTALL_PREFIX})
SET(BINDIR "${PREFIX}/bin")
SET(PREFIX_POPUP ${CMAKE_POPUP_INSTALL_PREFIX})
SET(POPUP_BINDIR "${PREFIX_POPUP}/bin")
SET(LIBDIR "${PREFIX}/lib")
SET(RESDIR "${PREFIX}/res")
SET(POPUP_RESDIR "${PREFIX_POPUP}/res")
SET(LOCALEDIR "${RESDIR}/locale")
SET(POPUP_LOCALEDIR "${POPUP_RESDIR}/locale")
ADD_DEFINITIONS("-D_TZ_SYS_RO_APP=\"${TZ_SYS_RO_APP}\"")
IF (CMAKE_BUILD_TYPE MATCHES "DEBUG")
ADD_DEFINITIONS("-DTIZEN_DEBUG_ENABLE")
ADD_DEFINITIONS("-DBUILD_TYPE_DEBUG")
ADD_DEFINITIONS("-DDPL_LOGS_ENABLED")
ENDIF (CMAKE_BUILD_TYPE MATCHES "DEBUG")
ADD_DEFINITIONS("-DPACKAGE=\"${PROJECT_NAME}\"")
ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
ADD_DEFINITIONS("-DPREFIX=\"${PREFIX}\"")
ADD_DEFINITIONS("-DRESDIR=\"${RESDIR}\"")
ADD_DEFINITIONS("-DLOCALEDIR=\"${LOCALEDIR}\"")
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
#ADD_DEFINITIONS("-DUG_WAYLAND")
ADD_SUBDIRECTORY(ui)
ADD_SUBDIRECTORY(ui-popup)
ADD_SUBDIRECTORY(po)
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res/icon DESTINATION DESTINATION ${TZ_SYS_RO_APP}/org.tizen.privacy-setting/res FILES_MATCHING PATTERN "*.png")
INSTALL(FILES ${CMAKE_SOURCE_DIR}/packaging/org.tizen.privacy-setting.xml DESTINATION ${TZ_SYS_RO_PACKAGES}/)
INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/res/button DESTINATION DESTINATION ${TZ_SYS_RO_APP}/org.tizen.privacy-setting-popup/res FILES_MATCHING PATTERN "*.png")
INSTALL(FILES ${CMAKE_SOURCE_DIR}/packaging/org.tizen.privacy-setting-popup.xml DESTINATION ${TZ_SYS_RO_PACKAGES}/)
|