# Copyright (c) 2023 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("//build/ohos.gni")
import("../gn/config.gni")
config("cli_config") {
  defines = [ "NOGDI" ]
  cflags = [ "-std=c++17" ]
}
ohos_source_set("cli_lite") {
  configs = [ ":cli_config" ]
  sources = [
    "CommandLine.cpp",
    "CommandLineFactory.cpp",
    "CommandLineInterface.cpp",
  ]

  deps = [
    "../jsapp:jsapp_lite",
    "../mock:mock_lite",
    "../util:util_lite",
    "//foundation/arkui/ace_engine_lite/frameworks/targets/simulator:ace_lite",
    "//third_party/libwebsockets:websockets_static",
  ]

  include_dirs = [
    ".",
    "../util/",
    "../jsapp/",
    "../jsapp/lite/",
    "//foundation/arkui/ui_lite/frameworks/",
    "//foundation/arkui/ui_lite/frameworks/dock/",
    "//foundation/graphic/graphic_utils_lite/interfaces/innerkits/",
    "//foundation/graphic/graphic_utils_lite/interfaces/kits/",
    "//foundation/arkui/ui_lite/interfaces/kits/",
    "//foundation/arkui/ui_lite/interfaces/innerkits/dock/",
    "//foundation/arkui/ui_lite/interfaces/innerkits/",
  ]

  include_dirs += [
    "../mock/",
    "../mock/lite/",
    "//third_party/cJSON/",
  ]

  cflags = [ "-Wno-deprecated-declarations" ]
  part_name = "previewer"
  subsystem_name = "ide"
}

ohos_source_set("cli_rich") {
  configs = [ ":cli_config" ]
  sources = [
    "CommandLine.cpp",
    "CommandLineFactory.cpp",
    "CommandLineInterface.cpp",
  ]

  deps = [
    "../jsapp:jsapp_rich",
    "../mock:mock_rich",
    "../util:util_rich",
    "//third_party/libwebsockets:websockets_static",
  ]

  include_dirs = [
    ".",
    "../util/",
    "../jsapp/",
    "../jsapp/rich/",
  ]
  include_dirs += [
    "../mock/",
    "../mock/rich/",
    "//third_party/cJSON/",
  ]

  include_dirs += os_include_dirs
  part_name = "previewer"
  subsystem_name = "ide"
}