add a sample to use cmake package (#4291)
- add a sample to use cmake package
This commit is contained in:
24
samples/printversion/test.sh
Executable file
24
samples/printversion/test.sh
Executable file
@ -0,0 +1,24 @@
|
||||
#! /bin/sh
|
||||
|
||||
# Copyright (C) 2025 Midokura Japan KK. All rights reserved.
|
||||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||||
|
||||
set -e
|
||||
|
||||
DIST=$(mktemp -d)
|
||||
|
||||
# WAMR_BUILD_SIMD=0 to avoid fetching simde, which is
|
||||
# not relevant to this particular test.
|
||||
cmake -B build-wamr \
|
||||
-D CMAKE_INSTALL_PREFIX=${DIST} \
|
||||
-D WAMR_BUILD_SIMD=0 \
|
||||
../..
|
||||
cmake --build build-wamr -t install
|
||||
|
||||
cmake -B build-app \
|
||||
-D CMAKE_PREFIX_PATH=${DIST} \
|
||||
-D CMAKE_INSTALL_PREFIX=${DIST} \
|
||||
.
|
||||
cmake --build build-app
|
||||
|
||||
./build-app/printversion
|
||||
Reference in New Issue
Block a user