-
Notifications
You must be signed in to change notification settings - Fork 2.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
273c202
commit 5626e22
Showing
4 changed files
with
102 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
if [ -n "$OHOS_NDK" ]; then | ||
export NDK=${OHOS_NDK} | ||
elif [ -n "$OHOS_NDK_HOME" ]; then | ||
export NDK=${OHOS_NDK_HOME} | ||
else | ||
export NDK=~/ohos-sdk/linux/native | ||
fi | ||
|
||
export PATH=${NDK}/build-tools/cmake/bin:$PATH | ||
|
||
function build() { | ||
ABI=$1 | ||
BUILD_PATH=build.OHOS.${ABI} | ||
cmake -H. -DOHOS_STL=c++_shared -B${BUILD_PATH} -DOHOS_ARCH=${ABI} -DOHOS_PLATFORM=OHOS -DCMAKE_TOOLCHAIN_FILE=${NDK}/build/cmake/ohos.toolchain.cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON | ||
cmake --build ${BUILD_PATH} --config Release | ||
mkdir -p plugin_lua53/Plugins/OpenHarmony/libs/${ABI}/ | ||
cp ${BUILD_PATH}/libxlua.so plugin_lua53/Plugins/OpenHarmony/libs/${ABI}/libxlua.so | ||
} | ||
|
||
build armeabi-v7a | ||
build arm64-v8a |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/bash | ||
|
||
if [ -n "$OHOS_NDK" ]; then | ||
export NDK=${OHOS_NDK} | ||
elif [ -n "$OHOS_NDK_HOME" ]; then | ||
export NDK=${OHOS_NDK_HOME} | ||
else | ||
export NDK=~/ohos-sdk/linux/native | ||
fi | ||
|
||
export PATH=${NDK}/build-tools/cmake/bin:$PATH | ||
|
||
function build() { | ||
ABI=$1 | ||
BUILD_PATH=build54.OHOS.${ABI} | ||
cmake -H. -DLUA_VERSION=5.4.1 -DOHOS_STL=c++_shared -B${BUILD_PATH} -DOHOS_ARCH=${ABI} -DOHOS_PLATFORM=OHOS -DCMAKE_TOOLCHAIN_FILE=${NDK}/build/cmake/ohos.toolchain.cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON | ||
cmake --build ${BUILD_PATH} --config Release | ||
mkdir -p plugin_lua54/Plugins/OpenHarmony/libs/${ABI}/ | ||
cp ${BUILD_PATH}/libxlua.so plugin_lua54/Plugins/OpenHarmony/libs/${ABI}/libxlua.so | ||
} | ||
|
||
build armeabi-v7a | ||
build arm64-v8a |