Skip to content

Commit

Permalink
fix ci builds
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerboa-app committed Dec 18, 2023
1 parent 8b37e6c commit afee648
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ jobs:
./cmdline-tools/latest/bin/sdkmanager "platform-tools" "platforms;android-33"
echo no | ./cmdline-tools/latest/bin/avdmanager create avd --name android33 --package "system-images;android-33;google_apis;x86_64"
- name: linux-android-hop
- name: build hop
run: |
./build.sh -r --android android-ndk-r25c
mkdir androidbuild
Expand All @@ -192,7 +192,7 @@ jobs:
name: androidbuild
path: androidbuild.zip

- name: linux-android-demo
- name: build demo
run: |
cp -r include/ demo/android/perlinWorld/app/src/main/cpp/
cp -r build/*.a demo/android/perlinWorld/app/src/main/cpp/include/
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ set(${VORBIS_INCLUDE_DIRS} include/vendored/vorbis/include)
file(GLOB MINIAUDIO_SRC "include/vendored/miniaudio/*.c")
include_directories(include/vendored/miniaudio ${VORBIS_INCLUDE_DIRS})
add_library(Miniaudio STATIC ${MINIAUDIO_SRC})
target_link_libraries(Miniaudio vorbisfile ogg)
target_link_libraries(Miniaudio vorbisfile ogg ${CMAKE_DL_LIBS})

include_directories(include include/vendored ${OPENGL_INCLUDE_DIRS} ${GLEW_INCLUDE} ${ZLIB_DEPS_DIR})

Expand Down
10 changes: 6 additions & 4 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ function buildAndroid()

mergeLibs "build-$1"
mv build-$1/libHop.a build/libHop-$1.a
mv build-$1/include/vendored/ogg/include/ogg/config_types.h include/vendored/ogg/include/ogg/
rm -rf build-$1

}
Expand Down Expand Up @@ -133,12 +134,15 @@ then
then
rm -rf build
fi
cmake -E make_directory build
mkdir build

if [[ $WINDOWS -eq 0 ]];
then
pwd
cd build
cmake .. -D WINDOWS=ON -D STANDALONE=$STANDALONE -D BUILD_DEMOS=$DEMO -D RELEASE=$RELEASE -D BENCHMARK=$BENCHMARK -D TEST_SUITE=$TEST -D SYNTAX_ONLY=$SYNTAX -D SANITISE=$SANITISE -D CMAKE_TOOLCHAIN_FILE=./windows.cmake && make -j 4
cd ..
pwd
# now copy dlls
PREFIX="x86_64-w64-mingw32"

Expand All @@ -164,11 +168,11 @@ then
"libstdc++-6.dll"
"libwinpthread-1.dll"
)

for j in "${dll[@]}"
do
findAndCopyDLL $j || echo "Could not find $j"
done
pwd

if [[ $RELEASE -eq 1 ]];
then
Expand All @@ -180,7 +184,6 @@ then
cp demo/desktop/include/SFML-2.5.1-mingw64/bin/sfml-window-d-2.dll build/
cp demo/desktop/include/SFML-2.5.1-mingw64/bin/sfml-graphics-d-2.dll build/
fi
cd ..
elif [[ $OSX -eq 0 ]];
then
cd build
Expand Down Expand Up @@ -214,6 +217,5 @@ fi

if [[ -z "$ANDROID_NDK" ]]
then
pwd
mergeLibs "build"
fi
4 changes: 4 additions & 0 deletions demo/android/perlinWorld/app/src/main/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ include_directories(include/vendored/freetype/include)
include_directories(include/vendored/stduuid/include)
include_directories(include/vendored/stduuid/)
include_directories(include/vendored/lua/src)
include_directories(include/vendored)
include_directories(include/vendored/vorbis/include)
include_directories(include/vendored/ogg/include)


link_directories(include)

Expand Down

0 comments on commit afee648

Please sign in to comment.