Skip to content

Commit

Permalink
[unity]add linux arm64 build
Browse files Browse the repository at this point in the history
  • Loading branch information
chexiongsheng committed May 17, 2024
1 parent af516e8 commit a16d501
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
11 changes: 11 additions & 0 deletions unity/cli/make.mts
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,17 @@ const platformCompileConfig = {
cd("..")
assert.equal(0, exec(`cmake --build ${CMAKE_BUILD_PATH} --config ${options.config}`).code)

return `${CMAKE_BUILD_PATH}/lib${cmakeAddedLibraryName}.so`;
}
},
'arm64': {
outputPluginPath: 'Linux/libs/arm64/',
hook: function (CMAKE_BUILD_PATH: string, options: BuildOptions, cmakeAddedLibraryName: string, cmakeDArgs: string) {
cd(CMAKE_BUILD_PATH);
assert.equal(0, exec(`cmake ${cmakeDArgs} -DJS_ENGINE=${options.backend} -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON -DCMAKE_BUILD_TYPE=${options.config} ..`).code)
cd("..")
assert.equal(0, exec(`cmake --build ${CMAKE_BUILD_PATH} --config ${options.config}`).code)

return `${CMAKE_BUILD_PATH}/lib${cmakeAddedLibraryName}.so`;
}
}
Expand Down
8 changes: 7 additions & 1 deletion unity/native_src/cmake/backends.json
Original file line number Diff line number Diff line change
Expand Up @@ -252,6 +252,9 @@
"linux": {
"x64": [
"/Lib/Linux/libwee8.a"
],
"arm64": [
"/Lib/Linux_arm64/libwee8.a"
]
}
},
Expand Down Expand Up @@ -312,6 +315,9 @@
"linux": {
"x64": [
"/Lib/Linux/libwee8.a"
],
"arm64": [
"/Lib/Linux_arm64/libwee8.a"
]
}
},
Expand Down Expand Up @@ -452,4 +458,4 @@
}
}
}
}
}

0 comments on commit a16d501

Please sign in to comment.