Skip to content

Commit

Permalink
Update building
Browse files Browse the repository at this point in the history
  • Loading branch information
JustDoom committed Dec 10, 2024
1 parent 097fd8b commit 868a31d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 16 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,14 @@ jobs:
mkdir -p output
ls build
ls build/bin
cp build/bin/8ChocChip output/
cp -r build/bin/assets output/
# cp build/bin/8ChocChip output/
# cp -r build/bin/assets output/

- name: Upload executable
uses: actions/upload-artifact@v4
with:
name: build-artifacts-linux
path: output/
path: build/bin/

build-windows:
runs-on: windows-latest
Expand Down Expand Up @@ -124,17 +124,17 @@ jobs:
dir build
dir build/bin
dir build/bin/Release
cp build/dependencies/nativefiledialog/src/Release/* output/
cp build/out/Release/libconfig++.* output/
cp build/src/Release/* output/
cp build/src/Release/assets/* output/assets
cp build/dependencies/nativefiledialog/src/Release/* build/bin/
cp build/out/Release/libconfig++.* build/bin/
# cp build/src/Release/* build/bin/
# cp build/src/Release/assets/* build/bin/assets
# cp -r assets output/

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: build-artifacts-windows
path: output/
path: build/bin/

- name: Test
working-directory: ${{ steps.strings.outputs.build-output-dir }}
Expand Down
17 changes: 9 additions & 8 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,18 @@ VERSION 0.1)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

add_executable(8ChocChip)

file(GLOB ASSETS "${CMAKE_SOURCE_DIR}/assets/*")
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

foreach(ASSET ${ASSETS})
configure_file(${ASSET} ${CMAKE_BINARY_DIR}/assets COPYONLY)
endforeach()
add_executable(8ChocChip)

set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
#option(BUILD_SHARED_LIBS "Build shared libraries" OFF)

#file(GLOB ASSETS "${CMAKE_SOURCE_DIR}/assets/*")
#
#foreach(ASSET ${ASSETS})
# configure_file(${ASSET} ${CMAKE_BINARY_DIR}/assets COPYONLY)
#endforeach()

add_subdirectory(dependencies)
add_subdirectory(src)

Expand All @@ -38,7 +39,7 @@ if(WIN32)
add_custom_command(
TARGET 8ChocChip
COMMENT "Copy OpenAL DLL"
PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${SFML_SOURCE_DIR}/extlibs/bin/$<IF:$<EQUAL:${CMAKE_SIZEOF_VOID_P},8>,x64,x86>/openal32.dll $<TARGET_FILE_DIR:8ChocChip>
PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy ${SFML_SOURCE_DIR}/extlibs/bin/$<IF:$<EQUAL:${CMAKE_SIZEOF_VOID_P},8>,x64,x86>/openal32.dll $<TARGET_FILE_DIR:${PROJECT_NAME}>
VERBATIM)

if (BUILD_SHARED_LIBS)
Expand Down

0 comments on commit 868a31d

Please sign in to comment.