Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions test/embedding/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,23 @@ cmake_minimum_required(VERSION 3.21.3)

project(embedtest)

include_directories("../../include/lwnode")
link_libraries(lwnode pthread)
add_compile_options(-std=c++17)
set(TARGET_OS "linux")
if (CMAKE_SYSTEM_PROCESSOR MATCHES "armv7l")
set(TARGET_OS "tizen/arm")
Comment thread
daeyeon marked this conversation as resolved.
endif()

set(BUILD_TYPE "Release")
if (CMAKE_BUILD_TYPE STREQUAL "Debug")
add_compile_options(-O2 -g)
link_directories("../../out/linux/Debug/lib")
else()
link_directories("../../out/linux/Release/lib")
set(BUILD_TYPE "Debug")
endif()

include_directories("../../include/lwnode")
find_library(LWNODE_LIB lwnode HINT "../../out/${TARGET_OS}/${BUILD_TYPE}/lib")
link_libraries(pthread ${LWNODE_LIB} -Wl,-rpath='./')

add_compile_options(-std=c++17)
Comment thread
daeyeon marked this conversation as resolved.

add_executable(embedtest.x embedtest.cc)
add_executable(example.x example.cc)
add_executable(send-message-sync.x send-message-sync.cc)
58 changes: 58 additions & 0 deletions test/embedding/packaging/lwnode-embedding.spec
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Copyright (c) 2025-present Samsung Electronics 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.

Name: lwnode-embedding
Summary: -
Version: 1.0.0
Release: 1
Group: Development
License: Apache-2.0 and MIT and BSD-2-Clause and BSD-3-Clause and BOEHM-GC and ICU and LGPL-2.1+ and Zlib
Source: %{name}-%{version}.tar.gz

BuildRequires: cmake
BuildRequires: make
BuildRequires: pkgconfig(dlog)


# Initialize the variables
%define _output_path out/tizen/arm/Release

%description
lwnode embedding test

%prep
%setup -q

%build

cmake -S test/embedding -B%{_output_path} -DCMAKE_BUILD_TYPE=Release
make -C %{_output_path} -j$(nproc)


%install

%clean
rm -fr ./*.list
rm -fr ./*.manifest

%post
/sbin/ldconfig

%postun
/sbin/ldconfig

%files
%defattr(-,tizenglobalapp,root,-)

%license LICENSE LICENSE.Apache-2.0 LICENSE.NodeJS LICENSE.MIT LICENSE.BSD-2-Clause LICENSE.BSD-3-Clause LICENSE.BOEHM-GC LICENSE.ICU LICENSE.LGPL-2.1+ LICENSE.Zlib