@@ -25,6 +25,13 @@ declare -A build_config=(
2525 [windows]=' RelWithDebInfo'
2626)
2727
28+ if [[ " $ci_platform " == " windows" ]] || [[ " $ci_platform " == " uwp" ]];
29+ then
30+ sep=' ;' # Windows uses semicolon as path separator
31+ else
32+ sep=' :' # Unix-like systems use colon as path separator
33+ fi
34+
2835function action-dependencies() {
2936 if [[ " $ci_platform " == " web" ]]; then
3037 sudo apt-get install -y --no-install-recommends uuid-dev ninja-build
@@ -40,6 +47,7 @@ function action-generate() {
4047 " -S"
4148 " $ci_source_dir "
4249 )
50+ CMAKE_PREFIX_PATH=' CMAKE_PREFIX_PATH'
4351 if [[ " $ci_platform " == " web" ]]; then
4452 params+=(
4553 " -G"
@@ -48,10 +56,10 @@ function action-generate() {
4856 " -DEMSCRIPTEN_ROOT_PATH=$EMSDK /upstream/emscripten/"
4957 " -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON"
5058 " -DBUILD_SHARED_LIBS=OFF"
51- " -DURHO3D_SDK=$ci_native_sdk_dir "
5259 " -DCI_WEB_BUILD=ON"
5360 " -DCMAKE_BUILD_TYPE=Release"
5461 )
62+ CMAKE_PREFIX_PATH=' CMAKE_FIND_ROOT_PATH'
5563 elif [[ " $ci_platform " == " windows" ]]; then
5664 params+=(
5765 " -G"
@@ -63,7 +71,11 @@ function action-generate() {
6371 fi
6472
6573 if [[ $ci_build_mode == " sdk" ]]; then
66- params+=(" -DREBELFORK_SDK=$ci_target_sdk_dir " )
74+ params+=(" -D$CMAKE_PREFIX_PATH =$ci_target_sdk_dir ${sep} $ci_native_sdk_dir " )
75+ else
76+ # Subdirectory mode: point to engine CMake directory
77+ local engine_path=" $ci_source_dir /../rbfx"
78+ params+=(" -D$CMAKE_PREFIX_PATH =$engine_path /CMake${sep} $ci_native_sdk_dir " )
6779 fi
6880
6981 cmake " ${params[@]} "
0 commit comments