config.gni 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # Copyright (c) 2022 Project CHIP Authors
  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. java_path = getenv("JAVA_PATH")
  15. declare_args() {
  16. java_matter_controller_dependent_paths = []
  17. # The class of each cluster created by ZAP is added to the library. (e.g., ChipClusters)
  18. matter_enable_java_generated_api = true
  19. # The API of TLV decoder created by ZAP is added to the library.
  20. # If the 'matter_enable_java_generated_api' feature is enabled, this feature must be enabled.
  21. matter_enable_tlv_decoder_api = true
  22. matter_enable_java_compilation = false
  23. if (java_path != "" && current_os == "linux") {
  24. java_matter_controller_dependent_paths += [ "${java_path}/include/" ]
  25. if (current_os == "mac") {
  26. java_matter_controller_dependent_paths +=
  27. [ "${java_path}/include/darwin/" ]
  28. } else {
  29. java_matter_controller_dependent_paths +=
  30. [ "${java_path}/include/linux/" ]
  31. }
  32. matter_enable_java_generated_api = false
  33. matter_enable_tlv_decoder_api = false
  34. matter_enable_java_compilation = true
  35. }
  36. }