Add caching of App/Pkg data & use faster way to retrieve this data
[platform/core/security/askuser.git] / src / common / CMakeLists.txt
1 # Copyright (c) 2014-2018 Samsung Electronics Co., Ltd All Rights Reserved
2 #
3 #    Licensed under the Apache License, Version 2.0 (the "License");
4 #    you may not use this file except in compliance with the License.
5 #    You may obtain a copy of the License at
6 #
7 #        http://www.apache.org/licenses/LICENSE-2.0
8 #
9 #    Unless required by applicable law or agreed to in writing, software
10 #    distributed under the License is distributed on an "AS IS" BASIS,
11 #    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 #    See the License for the specific language governing permissions and
13 #    limitations under the License.
14 #
15 # @file        CMakeLists.txt
16 # @author      Adam Malinowski <a.malinowsk2@partner.samsung.com>
17 #
18
19 PKG_CHECK_MODULES(COMMON_DEP
20     REQUIRED
21     security-manager
22     pkgmgr-info
23     security-privilege-manager
24     aul
25     )
26
27 SET(ASKUSER_COMMON_VERSION_MAJOR 0)
28 SET(ASKUSER_COMMON_VERSION ${ASKUSER_COMMON_VERSION_MAJOR}.1.0)
29
30 INCLUDE_DIRECTORIES(SYSTEM
31     ${COMMON_DEP_INCLUDE_DIRS}
32     )
33
34 SET(COMMON_PATH ${ASKUSER_PATH}/common)
35
36 INCLUDE_DIRECTORIES(
37     ${COMMON_PATH}
38     )
39
40 SET(COMMON_SOURCES
41     ${COMMON_PATH}/log/alog.cpp
42     ${COMMON_PATH}/policy/AppInfo.cpp
43     ${COMMON_PATH}/policy/PkgInfo.cpp
44     ${COMMON_PATH}/policy/Policy.cpp
45     ${COMMON_PATH}/policy/PrivilegeInfo.cpp
46     ${COMMON_PATH}/policy/PrivilegePolicy.cpp
47     ${COMMON_PATH}/types/AgentErrorMsg.cpp
48     ${COMMON_PATH}/util/SafeFunction.cpp
49     ${COMMON_PATH}/config/Limits.cpp
50     )
51
52 ADD_DEFINITIONS("-fvisibility=default")
53
54 ADD_LIBRARY(${TARGET_ASKUSER_COMMON} SHARED ${COMMON_SOURCES})
55
56 SET_TARGET_PROPERTIES(
57     ${TARGET_ASKUSER_COMMON}
58     PROPERTIES
59         SOVERSION ${ASKUSER_COMMON_VERSION_MAJOR}
60         VERSION ${ASKUSER_COMMON_VERSION}
61     )
62
63 TARGET_LINK_LIBRARIES(${TARGET_ASKUSER_COMMON}
64     ${COMMON_DEP_LIBRARIES}
65     )
66
67 INSTALL(TARGETS ${TARGET_ASKUSER_COMMON} DESTINATION ${LIB_INSTALL_DIR})