Skip to content

Commit a62e413

Browse files
committed
CI: Fix build.
1 parent 94c52d5 commit a62e413

2 files changed

Lines changed: 9 additions & 3 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ on:
1515

1616
env:
1717
# Common settings.
18-
CMAKE_VERSION: 3.21.x
18+
CMAKE_VERSION: 3.24.x
1919
# Common paths.
2020
ci_source_dir: ${{ github.workspace }}/source-code
2121
ci_build_script: ./source-code/Script/ci_build.sh

Script/ci_build.sh

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ function action-generate() {
4040
"-S"
4141
"$ci_source_dir"
4242
)
43+
CMAKE_PREFIX_PATH='CMAKE_PREFIX_PATH'
4344
if [[ "$ci_platform" == "web" ]]; then
4445
params+=(
4546
"-G"
@@ -48,10 +49,10 @@ function action-generate() {
4849
"-DEMSCRIPTEN_ROOT_PATH=$EMSDK/upstream/emscripten/"
4950
"-DCMAKE_BUILD_WITH_INSTALL_RPATH=ON"
5051
"-DBUILD_SHARED_LIBS=OFF"
51-
"-DURHO3D_SDK=$ci_native_sdk_dir"
5252
"-DCI_WEB_BUILD=ON"
5353
"-DCMAKE_BUILD_TYPE=Release"
5454
)
55+
CMAKE_PREFIX_PATH='CMAKE_FIND_ROOT_PATH'
5556
elif [[ "$ci_platform" == "windows" ]]; then
5657
params+=(
5758
"-G"
@@ -63,9 +64,14 @@ function action-generate() {
6364
fi
6465

6566
if [[ $ci_build_mode == "sdk" ]]; then
66-
params+=("-DREBELFORK_SDK=$ci_target_sdk_dir")
67+
params+=("-D$CMAKE_PREFIX_PATH=$ci_target_sdk_dir;$ci_native_sdk_dir")
68+
else
69+
# Subdirectory mode: point to engine CMake directory
70+
local engine_path="$ci_source_dir/../rbfx"
71+
params+=("-D$CMAKE_PREFIX_PATH=$engine_path/CMake;$ci_native_sdk_dir")
6772
fi
6873

74+
echo "cmake ${params[@]}"
6975
cmake "${params[@]}"
7076
}
7177

0 commit comments

Comments
 (0)