From 180dd46ab7e45bd66b7f16f9f5ce77f88481d0ee Mon Sep 17 00:00:00 2001 From: liuyangyang Date: Fri, 29 Jul 2022 17:07:06 +0800 Subject: [PATCH] add previewer directory Signed-off-by: liuyangyang Change-Id: Iacd47f0bbb520ce76c193838bb77d5575f6ae5a4 --- previewer/BUILD.gn | 39 +++++++++++++++++++++++++++++++++++++++ previewer/src/window.cpp | 14 ++++++++++++++ previewer/src/window.h | 18 ++++++++++++++++++ 3 files changed, 71 insertions(+) create mode 100644 previewer/BUILD.gn create mode 100644 previewer/src/window.cpp create mode 100644 previewer/src/window.h diff --git a/previewer/BUILD.gn b/previewer/BUILD.gn new file mode 100644 index 00000000..9f8c9190 --- /dev/null +++ b/previewer/BUILD.gn @@ -0,0 +1,39 @@ +# Copyright (c) 2022 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") + +ohos_shared_library("previewer_shared") { + libs = [] + sources = [ "src/window.cpp" ] + include_dirs = [ "src/" ] + cflags = [ "-std=c++17" ] + part_name = "window_manager" + subsystem_name = "window" +} + +ohos_copy("copy_previewer_library") { + if (host_os == "mac") { + suffix = ".dylib" + } else { + suffix = ".dll" + } + shared_library_path = get_label_info(":previewer_shared", "root_out_dir") + + "/window/window_manager/libpreviewer_shared" + suffix + deps = [ ":previewer_shared" ] + sources = [ shared_library_path ] + outputs = + [ target_out_dir + "/previewer/common/bin/libpreviewer_shared" + suffix ] + module_source_dir = target_out_dir + "/previewer/common/bin/" + module_install_name = "" +} diff --git a/previewer/src/window.cpp b/previewer/src/window.cpp new file mode 100644 index 00000000..6be755b6 --- /dev/null +++ b/previewer/src/window.cpp @@ -0,0 +1,14 @@ +/* + * Copyright (c) 2022 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. + */ \ No newline at end of file diff --git a/previewer/src/window.h b/previewer/src/window.h new file mode 100644 index 00000000..7153308c --- /dev/null +++ b/previewer/src/window.h @@ -0,0 +1,18 @@ +/* + * Copyright (c) 2022 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. + */ + +#ifndef OHOS_WINDOW_H +#define OHOS_WINDOW_H +#endif // OHOS_WINDOW_H \ No newline at end of file