Skip to content

Commit

Permalink
Configured workflows and CMakeLists.txt (#32)
Browse files Browse the repository at this point in the history
* ...

* Update cmake-multi-platform-make-release.yml

* Update cmake-multi-platform-make-release.yml

* Update cmake-multi-platform-make-release.yml

* Update cmake-multi-platform-make-release.yml

* Update cmake-multi-platform-make-release.yml

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update cmake-multi-platform-make-release.yml

* Update cmake-multi-platform.yml

* Update CMakeLists.txt

* Update CMakeLists.txt

* Ipagaxi patch 2 (#31)

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Update CMakeLists.txt

* Now resources (images, sounds etc.) are copied to project_build during installation

* ...

* renamed workflows
  • Loading branch information
Ipagaxi committed Mar 12, 2024
1 parent 15cd935 commit 9156cb8
Show file tree
Hide file tree
Showing 137 changed files with 19 additions and 26,658 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This starter workflow is for a CMake project running on multiple platforms. There is a different starter workflow if you just want a single platform.
# See: https://github.com/actions/starter-workflows/blob/main/ci/cmake-single-platform.yml
name: CMake on multiple platforms
name: Check Multi-Platform

on: [push]

Expand Down Expand Up @@ -69,7 +69,6 @@ jobs:
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DCMAKE_INSTALL_PREFIX=~/.local/myproject
-S ${{ github.workspace }}
- name: Build
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Create Releases
name: Upload Build Artifacts

on:
pull_request:
Expand Down Expand Up @@ -50,13 +50,8 @@ jobs:
run: |
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Create Linux Build Output Directory
if: matrix.ox == 'Linux'
run: mkdir ./${{ runner.os }}_build

- name: Create Windows Build Output Directory
if: matrix.ox == 'Windows'
run: mkdir .\${{ runner.os }}_build
- name: Create Build Output Directory
run: mkdir ./project_build

- name: Install development libraries (Ubuntu/Debian)
if: matrix.os == 'ubuntu-latest'
Expand All @@ -77,7 +72,7 @@ jobs:
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DCMAKE_INSTALL_PREFIX=./${{ runner.os }}_build
-DCMAKE_INSTALL_PREFIX=./project_build
-S ${{ github.workspace }}
- name: Configure CMake (on Windows)
Expand All @@ -89,7 +84,6 @@ jobs:
-DCMAKE_CXX_COMPILER=${{ matrix.cpp_compiler }}
-DCMAKE_C_COMPILER=${{ matrix.c_compiler }}
-DCMAKE_BUILD_TYPE=${{ matrix.build_type }}
-DCMAKE_INSTALL_PREFIX=.\${{ runner.os }}_build
-S ${{ github.workspace }}
- name: Build (Linux)
Expand All @@ -103,16 +97,9 @@ jobs:
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} --target install

- uses: actions/upload-artifact@v3 # Upload build artifacts
if: runner.os == 'Windows'
with:
name: ${{ runner.os }}_build # Name for the artifact cache
path: .\${{ runner.os }}_build # Path containing built artifacts

- uses: actions/upload-artifact@v3 # Upload build artifacts
if: runner.os == 'Linux'
with:
name: ${{ runner.os }}_build # Name for the artifact cache
path: ./${{ runner.os }}_build # Path containing built artifacts
path: ./project_build # Path containing built artifacts

# - name: Create Release # Create the release on GitHub
# id: create_release
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ out
.cache
.idea
.vs
.vscode
.vscode
project_build
9 changes: 8 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ file(GLOB source_files
)
set(SOURCES ${source_files})

set(CMAKE_INSTALL_PREFIX project_build)
set(CMAKE_INSTALL_PREFIX ${PROJECT_SOURCE_DIR}/project_build)
message (STATUS "CMAKE_INSTALL_PREFIX: ${CMAKE_INSTALL_PREFIX}")

file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
Expand Down Expand Up @@ -43,4 +43,11 @@ if(WIN32)
VERBATIM)
endif()

add_custom_command(
TARGET ${PROJECT_NAME}
COMMENT "Copy resources"
PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory ${PROJECT_SOURCE_DIR}/src/resources $<TARGET_FILE_DIR:${PROJECT_NAME}>/resources
VERBATIM)

install(TARGETS ${PROJECT_NAME})
install(DIRECTORY ${PROJECT_SOURCE_DIR}/src/resources DESTINATION ${CMAKE_INSTALL_PREFIX}/bin)
Binary file removed Release/bin/PnC.exe
Binary file not shown.
Binary file removed Release/bin/openal32.dll
Binary file not shown.
56 changes: 0 additions & 56 deletions Release/include/SFML/Audio.hpp

This file was deleted.

70 changes: 0 additions & 70 deletions Release/include/SFML/Audio/AlResource.hpp

This file was deleted.

48 changes: 0 additions & 48 deletions Release/include/SFML/Audio/Export.hpp

This file was deleted.

Loading

0 comments on commit 9156cb8

Please sign in to comment.