blob: 942c9e8dbbc6f71038fcb610024aac428bd61719 [file] [log] [blame]
# Copyright 2022 The Pigweed 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
#
# https://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/pigweed.gni")
import("$dir_pw_arduino_build/arduino.gni")
import("$dir_pw_build/target_types.gni")
if (pw_arduino_build_CORE_PATH != "") {
# Common library arguments to the arduino_builder tool.
_library_args = [
"--library-path",
rebase_path(
"$pw_arduino_build_CORE_PATH/teensy/hardware/teensy/avr/libraries"),
rebase_path("libraries"),
"--library-names",
# Arduino Core Libaries. The c/c++ files for these should only be included
# once in any given pw_executable.
"SPI",
"Wire",
# Additional libraries
# Requires SPI+Wire
"Adafruit_BusIO-1.7.1",
# Requires Adafruit_BusIO
"Adafruit-GFX-Library-1.10.4",
# Requires Adafruit-GFX
"ILI9341_t3n-a9a6ff5d78b1207ae7fd394f44e83e322863e55f",
]
_library_c_files = exec_script(
arduino_builder_script,
arduino_show_command_args + _library_args + [ "--library-c-files" ],
"list lines")
_library_cpp_files = exec_script(
arduino_builder_script,
arduino_show_command_args + _library_args + [ "--library-cpp-files" ],
"list lines")
_library_include_dirs =
exec_script(arduino_builder_script,
arduino_show_command_args + _library_args +
[ "--library-include-dirs" ],
"list lines")
pw_source_set("pw_display_teensy_ili9341") {
deps = [
"$dir_pw_display:pw_display.facade",
"$dir_pw_third_party/arduino:arduino_core_sources",
]
sources = [ "display.cc" ] + _library_c_files + _library_cpp_files
include_dirs = _library_include_dirs
remove_configs = [ "$dir_pw_build:strict_warnings" ]
}
}