# Copyright (c) 2021 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. import("//foundation/communication/dsoftbus/dsoftbus.gni") AUTH_SERVER_DEFINES = [] if (dsoftbus_standard_feature_auth_account == true) { AUTH_SERVER_DEFINES += [ "AUTH_ACCOUNT" ] } authentication_path = "$dsoftbus_root_path/core/authentication" if (dsoftbus_standard_feature_lnn_net) { auth_server_src = [ "$authentication_path/src/auth_common.c", "$authentication_path/src/auth_connection.c", "$authentication_path/src/auth_manager.c", "$authentication_path/src/auth_p2p.c", "$authentication_path/src/auth_sessionkey.c", ] if (dsoftbus_standard_feature_ip_auth) { auth_server_src += [ "$dsoftbus_root_path/core/authentication/src/auth_socket.c" ] } else { auth_server_src += [ "$dsoftbus_root_path/core/authentication/src/auth_socket_virtual.c" ] } } else { auth_server_src = [ "$authentication_path/src/auth_manager_virtual.c", "$authentication_path/src/auth_socket_virtual.c", ] } auth_server_inc = [ "$dsoftbus_root_path/core/authentication/include", "$dsoftbus_root_path/core/authentication/interface", ] auth_server_deps = [] if (defined(ohos_lite)) { if (ohos_kernel_type == "liteos_m") { auth_server_inc += [ "//base/security/deviceauth/interfaces/innerkits" ] if (dsoftbus_standard_feature_lnn_net) { auth_server_deps += [ "//base/security/deviceauth:deviceauth_lite" ] } } else { auth_server_inc += [ "//third_party/cJSON" ] if (dsoftbus_standard_feature_lnn_net) { auth_server_deps += [ "//base/security/deviceauth/services:deviceauth_sdk" ] } } } else { auth_server_inc += [ "//base/security/deviceauth/interfaces/innerkits" ] }