• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2020 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14cmake_minimum_required(VERSION 3.1.0)
15
16project(nativeapi_storage LANGUAGES CXX)
17
18set(CMAKE_CXX_STANDARD 11)
19set(CMAKE_CXX_STANDARD_REQUIRED ON)
20set(CMAKE_INCLUDE_CURRENT_DIR ON)
21
22set(JSFWK_INTERFACES_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../foundation/arkui/interfaces/inner_api/builtin")
23set(PARAM_INTERFACES_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../base/startup/syspara_lite/interfaces/kits")
24set(PARAM_FRAMEWORKS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../base/startup/syspara_lite/frameworks")
25set(PARAM_HALS_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../base/startup/syspara_lite/hals")
26set(SECUREC_INTERFACES_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../third_party/bounds_checking_function/include")
27set(ABILITY_INTERFACES_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../foundation/aafwk/aafwk_lite/interfaces/kits/ability_lite")
28set(UI_INTERFACES_PATH "${CMAKE_CURRENT_SOURCE_DIR}/../../../../../foundation/arkui/ui_ext_lite")
29
30# header files
31include_directories(
32    ${PARAM_INTERFACES_PATH}
33    ${SECUREC_INTERFACES_PATH}
34    ${ABILITY_INTERFACES_PATH}
35    ${PARAM_FRAMEWORKS_PATH}/parameter/src
36    ${PARAM_HALS_PATH}
37    ${CMAKE_CURRENT_SOURCE_DIR}/common/include
38    ${CMAKE_CURRENT_SOURCE_DIR}/deviceinfokit/include
39    ${CMAKE_CURRENT_SOURCE_DIR}/filekit/include
40    ${CMAKE_CURRENT_SOURCE_DIR}/kvstorekit/include
41    ${CMAKE_CURRENT_SOURCE_DIR}/../../include
42    )
43
44# source files
45aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/common/src COMMON)
46aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/deviceinfokit/src DEVICEINFO)
47aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/filekit/src FILEKIT)
48aux_source_directory(${CMAKE_CURRENT_SOURCE_DIR}/kvstorekit/src KVSTOREKIT)
49
50add_library(utils_jsapi STATIC
51    ${PARAM_FRAMEWORKS_PATH}/parameter/src/parameter_common.c
52    ${PARAM_FRAMEWORKS_PATH}/parameter/src/param_impl_posix/param_impl_posix.c
53    ${COMMON}
54    ${DEVICEINFO}
55    ${FILEKIT}
56    ${KVSTOREKIT}
57    )
58
59target_compile_definitions(utils_jsapi PRIVATE INCREMENTAL_VERSION=""
60    BUILD_TYPE=""
61    BUILD_USER=""
62    BUILD_TIME=""
63    BUILD_HOST=""
64    BUILD_ROOTHASH="")
65
66target_link_libraries(utils_jsapi jsfwk ui)
67target_include_directories(utils_jsapi PUBLIC ${ABILITY_INTERFACES_PATH} ${PARAM_INTERFACES_PATH} ${PARAM_HALS_PATH})
68