fix: assets path now should be there

This commit is contained in:
theoleuthardt 2025-03-13 11:55:19 +01:00
parent 629bb63422
commit 346eba766b
2 changed files with 31 additions and 10 deletions

View file

@ -38,19 +38,39 @@ jobs:
Import-Module $env:ChocolateyInstall\helpers\chocolateyProfile.psm1
shell: powershell
- name: Create Build Directories
run: |
mkdir -p build/windows/assets
mkdir -p build/linux/assets
mkdir -p build/macos/assets
shell: bash
- name: Configure CMake
run: cmake -B build
shell: bash
# Modifikation hier - manuelles Kopieren der Assets vor dem Build
- name: Copy Assets (macOS)
if: runner.os == 'macOS'
run: |
mkdir -p build/macos
cp -r assets build/macos/
shell: bash
- name: Copy Assets (Linux)
if: runner.os == 'Linux'
run: |
mkdir -p build/linux
cp -r assets build/linux/
shell: bash
- name: Copy Assets (Windows)
if: runner.os == 'Windows'
run: |
mkdir -p build/windows
cp -r assets build/windows/
shell: bash
- name: Build Project
run: cmake --build build --config Release
run: |
if [ "${{ runner.os }}" == "macOS" ]; then
cmake --build build --config Release --target DinoGame
else
cmake --build build --config Release
fi
shell: bash
- name: Determine Output Directory

View file

@ -58,7 +58,8 @@ target_link_libraries(${PROJECT_NAME} PRIVATE raylib)
target_compile_definitions(${PROJECT_NAME} PRIVATE RAYLIB_STATIC)
add_custom_target(copy_assets ALL
COMMAND ${CMAKE_COMMAND} -E copy_directory
${ASSETS_PATH} ${OUTPUT_DIR}/assets
COMMAND ${CMAKE_COMMAND} -E remove_directory ${OUTPUT_DIR}/assets
COMMAND ${CMAKE_COMMAND} -E make_directory ${OUTPUT_DIR}/assets
COMMAND ${CMAKE_COMMAND} -E copy_directory ${ASSETS_PATH} ${OUTPUT_DIR}/assets
)
add_dependencies(${PROJECT_NAME} copy_assets)