blob: dfc730f2a0deccdc11e12ec30756f3ed9cf8f6dc [file] [log] [blame]
# Copyright (c) 2025 Project CHIP Authors
#
# 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("//build_overrides/build.gni")
import("//build_overrides/chip.gni")
import("${chip_root}/build/chip/tools.gni")
import("${chip_root}/build/config/compiler/compiler.gni")
import("${chip_root}/examples//chip-tool/chip-tool.gni")
declare_args() {
if (!defined(chip_config_network_layer_ble)) {
chip_config_network_layer_ble = true
}
if (!defined(is_clang)) {
is_clang = false
}
enable_provisional_features = config_enable_yaml_tests
# Disable generating compiler database by default
generate_compilation_database = false
# Use Network.framework instead of POSIX sockets
use_network_framework = false
}
sdk = "macosx"
sdk_build_dir_suffix = ""
sdk_root_parts = []
if (getenv("SDKROOT") != "") {
sdk = getenv("SDKROOT")
sdk_root_parts = string_split(getenv("SDKROOT"), ".")
if (sdk_root_parts[0] != "macosx") {
sdk_build_dir_suffix = "-${sdk_root_parts[0]}"
}
}
target_sdk_is_macosx = sdk == "macosx" || (len(sdk_root_parts) > 0 &&
sdk_root_parts[0] == "macosx")
darwin_framework_out_dir = "macos_framework_output"
darwin_sdk_build_config = "Debug${sdk_build_dir_suffix}"
darwin_framework_products_dir =
"${darwin_framework_out_dir}/Build/Products/${darwin_sdk_build_config}"
darwin_framework_intermediates_dir = "${darwin_framework_out_dir}/Build/Intermediates.noindex/Matter.build/${darwin_sdk_build_config}/Matter.build/out"