mirror of
https://github.com/bkaradzic/bgfx.cmake.git
synced 2026-02-17 21:12:35 +01:00
Compare commits
18 Commits
v1.118.845
...
v1.118.849
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9d8213645b | ||
|
|
376cdd9205 | ||
|
|
9ad4a8a69a | ||
|
|
398b09ef17 | ||
|
|
0fc04361c8 | ||
|
|
f5afee9379 | ||
|
|
16ae1476f0 | ||
|
|
c2eb5368fa | ||
|
|
86fa198254 | ||
|
|
84f51c4f0f | ||
|
|
fab7c74fa9 | ||
|
|
b520b4686c | ||
|
|
dd8b8db87b | ||
|
|
cbb7c340ba | ||
|
|
2a53415f03 | ||
|
|
7d89f8ee50 | ||
|
|
487fa0c63b | ||
|
|
9670cf4f43 |
6
.github/workflows/ci.yml
vendored
6
.github/workflows/ci.yml
vendored
@@ -17,7 +17,7 @@ jobs:
|
||||
env:
|
||||
CMAKE_VERSION: 3.10.2
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install Linux dependencies
|
||||
@@ -57,7 +57,7 @@ jobs:
|
||||
CC: ${{ matrix.cc }}
|
||||
CXX: ${{ matrix.cxx }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install Linux dependencies
|
||||
@@ -94,7 +94,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install Linux dependencies
|
||||
|
||||
101
.github/workflows/release.yml
vendored
101
.github/workflows/release.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
sha: ${{ steps.version.outputs.sha }}
|
||||
tag: ${{ steps.version.outputs.tag }}
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
@@ -29,9 +29,9 @@ jobs:
|
||||
BGFX_CMAKE_REVISION=$(git rev-list HEAD --count)
|
||||
SHA=$(cd bgfx && git rev-parse HEAD)
|
||||
TAG="v1.${API_VERSION}.${BGFX_REVISION}-${BGFX_CMAKE_REVISION}"
|
||||
echo "::set-output name=revision::${BGFX_REVISION}"
|
||||
echo "::set-output name=sha::${SHA}"
|
||||
echo "::set-output name=tag::${TAG}"
|
||||
echo "revision=${BGFX_REVISION}" >> $GITHUB_OUTPUT
|
||||
echo "sha=${SHA}" >> $GITHUB_OUTPUT
|
||||
echo "tag=${TAG}" >> $GITHUB_OUTPUT
|
||||
|
||||
build:
|
||||
name: ${{ matrix.os }}
|
||||
@@ -51,7 +51,7 @@ jobs:
|
||||
CMAKE_INSTALL_DIR: ${{ github.workspace }}/install/
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install Linux dependencies
|
||||
@@ -75,12 +75,12 @@ jobs:
|
||||
# Run CMake to generate project files
|
||||
- name: Generate project files
|
||||
run: |
|
||||
cmake -B "${{ env.CMAKE_BUILD_DIR }}" -DCMAKE_INSTALL_PREFIX="${{ env.CMAKE_INSTALL_DIR }}" -DCMAKE_DEBUG_POSTFIX=d -DBGFX_BUILD_EXAMPLES=OFF -DBGFX_BUILD_TOOLS=ON -DBGFX_INSTALL=ON -DBGFX_AMALGAMATED=ON -DCMAKE_BUILD_TYPE=Release
|
||||
cmake -B "${{ env.CMAKE_BUILD_DIR }}" "-DCMAKE_INSTALL_PREFIX=${{ env.CMAKE_INSTALL_DIR }}" -DCMAKE_DEBUG_POSTFIX=d -DBGFX_BUILD_EXAMPLES=OFF -DBGFX_BUILD_TOOLS=ON -DBGFX_INSTALL=ON -DBGFX_AMALGAMATED=ON -DCMAKE_BUILD_TYPE=Release
|
||||
# Build the install targets
|
||||
- name: Build
|
||||
run: |
|
||||
cmake --build "${{ env.CMAKE_BUILD_DIR }}" --target install --config Release
|
||||
- uses: actions/upload-artifact@v2
|
||||
- uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: ${{ matrix.os }}
|
||||
path: ${{ github.workspace }}/install/
|
||||
@@ -90,11 +90,86 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ version, build ]
|
||||
if: github.repository == 'bkaradzic/bgfx.cmake' && github.event_name == 'push'
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- name: Create Release
|
||||
uses: actions/create-release@v1
|
||||
- uses: actions/checkout@v3
|
||||
with:
|
||||
tag_name: ${{ needs.version.outputs.tag }}
|
||||
release_name: ${{ needs.version.outputs.tag }}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: windows-latest
|
||||
path: ${{ github.workspace }}/install/windows
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: ubuntu-latest
|
||||
path: ${{ github.workspace }}/install/linux
|
||||
- uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: macos-latest
|
||||
path: ${{ github.workspace }}/install/macos
|
||||
- name: Create Source Zip
|
||||
uses: thedoctor0/zip-release@0.7.1
|
||||
with:
|
||||
type: 'zip'
|
||||
filename: 'release.${{ needs.version.outputs.tag }}.zip'
|
||||
directory: '..'
|
||||
path: 'bgfx.cmake'
|
||||
exclusions: '.git* .cmake-format.py .editorconfig install'
|
||||
- name: Create Source Tar
|
||||
uses: thedoctor0/zip-release@0.7.1
|
||||
with:
|
||||
type: 'tar'
|
||||
filename: 'release.${{ needs.version.outputs.tag }}.tar.gz'
|
||||
directory: '..'
|
||||
path: 'bgfx.cmake'
|
||||
exclusions: '.git* .cmake-format.py .editorconfig install'
|
||||
- name: Create Windows Zip
|
||||
uses: thedoctor0/zip-release@0.7.1
|
||||
with:
|
||||
type: 'zip'
|
||||
filename: 'windows.${{ needs.version.outputs.tag }}.zip'
|
||||
directory: 'install'
|
||||
path: 'windows'
|
||||
- name: Create Windows Tar
|
||||
uses: thedoctor0/zip-release@0.7.1
|
||||
with:
|
||||
type: 'tar'
|
||||
filename: 'windows.${{ needs.version.outputs.tag }}.tar.gz'
|
||||
directory: 'install'
|
||||
path: 'windows'
|
||||
- name: Create Linux Zip
|
||||
uses: thedoctor0/zip-release@0.7.1
|
||||
with:
|
||||
type: 'zip'
|
||||
filename: 'linux.${{ needs.version.outputs.tag }}.zip'
|
||||
directory: 'install'
|
||||
path: 'linux'
|
||||
- name: Create Linux Tar
|
||||
uses: thedoctor0/zip-release@0.7.1
|
||||
with:
|
||||
type: 'tar'
|
||||
filename: 'linux.${{ needs.version.outputs.tag }}.tar.gz'
|
||||
directory: 'install'
|
||||
path: 'linux'
|
||||
- name: Create MacOS Zip
|
||||
uses: thedoctor0/zip-release@0.7.1
|
||||
with:
|
||||
type: 'zip'
|
||||
filename: 'macos.${{ needs.version.outputs.tag }}.zip'
|
||||
directory: 'install'
|
||||
path: 'macos'
|
||||
- name: Create MacOS Tar
|
||||
uses: thedoctor0/zip-release@0.7.1
|
||||
with:
|
||||
type: 'tar'
|
||||
filename: 'macos.${{ needs.version.outputs.tag }}.tar.gz'
|
||||
directory: 'install'
|
||||
path: 'macos'
|
||||
- name: Create Release
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
tag: ${{ needs.version.outputs.tag }}
|
||||
artifacts: "../release.${{ needs.version.outputs.tag }}.zip ../release.${{ needs.version.outputs.tag }}.tar.gz install/*.${{ needs.version.outputs.tag }}.zip install/*.${{ needs.version.outputs.tag }}.tar.gz"
|
||||
generateReleaseNotes: true
|
||||
|
||||
2
bgfx
2
bgfx
Submodule bgfx updated: 538c9a05eb...e7e75e4bff
2
bimg
2
bimg
Submodule bimg updated: 7afa241925...ec02df824a
2
bx
2
bx
Submodule bx updated: 4e67e34c4b...7ac95d5131
@@ -105,7 +105,7 @@ function(add_bgfx_shader FILE FOLDER)
|
||||
|
||||
foreach(OUT ${OUTPUTS})
|
||||
list(APPEND OUTPUT_FILES ${${OUT}_OUTPUT})
|
||||
list(APPEND COMMANDS COMMAND "$<TARGET_FILE:shaderc>" ${${OUT}})
|
||||
list(APPEND COMMANDS COMMAND "bgfx::shaderc" ${${OUT}})
|
||||
get_filename_component(OUT_DIR ${${OUT}_OUTPUT} DIRECTORY)
|
||||
file(MAKE_DIRECTORY ${OUT_DIR})
|
||||
endforeach()
|
||||
|
||||
@@ -27,8 +27,11 @@ set_target_properties(
|
||||
OUTPUT_NAME ${BGFX_TOOLS_PREFIX}geometryc #
|
||||
)
|
||||
|
||||
if(BGFX_BUILD_TOOLS_GEOMETRY AND BGFX_CUSTOM_TARGETS)
|
||||
add_dependencies(tools geometryc)
|
||||
if(BGFX_BUILD_TOOLS_GEOMETRY)
|
||||
add_executable(bgfx::geometryc ALIAS geometryc)
|
||||
if(BGFX_CUSTOM_TARGETS)
|
||||
add_dependencies(tools geometryc)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(IOS)
|
||||
|
||||
@@ -50,8 +50,11 @@ set_target_properties(
|
||||
OUTPUT_NAME ${BGFX_TOOLS_PREFIX}shaderc #
|
||||
)
|
||||
|
||||
if(BGFX_BUILD_TOOLS_SHADER AND BGFX_CUSTOM_TARGETS)
|
||||
add_dependencies(tools shaderc)
|
||||
if(BGFX_BUILD_TOOLS_SHADER)
|
||||
add_executable(bgfx::shaderc ALIAS shaderc)
|
||||
if(BGFX_CUSTOM_TARGETS)
|
||||
add_dependencies(tools shaderc)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ANDROID)
|
||||
|
||||
@@ -535,12 +535,14 @@ endfunction()
|
||||
# SHADERS filenames
|
||||
# VARYING_DEF filename
|
||||
# OUTPUT_DIR directory
|
||||
# OUT_FILES_VAR variable name
|
||||
# INCLUDE_DIRS directories
|
||||
# )
|
||||
#
|
||||
function(bgfx_compile_shader_to_header)
|
||||
set(options "")
|
||||
set(oneValueArgs TYPE VARYING_DEF OUTPUT_DIR)
|
||||
set(multiValueArgs SHADERS)
|
||||
set(oneValueArgs TYPE VARYING_DEF OUTPUT_DIR OUT_FILES_VAR)
|
||||
set(multiValueArgs SHADERS INCLUDE_DIRS)
|
||||
cmake_parse_arguments(ARGS "${options}" "${oneValueArgs}" "${multiValueArgs}" "${ARGN}")
|
||||
|
||||
set(PROFILES 120 300_es spirv) # pssl
|
||||
@@ -572,6 +574,7 @@ function(bgfx_compile_shader_to_header)
|
||||
message(error "shaderc: Unsupported platform")
|
||||
endif()
|
||||
|
||||
set(ALL_OUTPUTS "")
|
||||
foreach(SHADER_FILE ${ARGS_SHADERS})
|
||||
source_group("Shaders" FILES "${SHADER}")
|
||||
get_filename_component(SHADER_FILE_BASENAME ${SHADER_FILE} NAME)
|
||||
@@ -596,10 +599,11 @@ function(bgfx_compile_shader_to_header)
|
||||
PROFILE ${PROFILE}
|
||||
O "$<$<CONFIG:debug>:0>$<$<CONFIG:release>:3>$<$<CONFIG:relwithdebinfo>:3>$<$<CONFIG:minsizerel>:3>"
|
||||
VARYINGDEF ${ARGS_VARYING_DEF}
|
||||
INCLUDES ${BGFX_SHADER_INCLUDE_PATH}
|
||||
INCLUDES ${BGFX_SHADER_INCLUDE_PATH} ${ARGS_INCLUDE_DIRS}
|
||||
BIN2C BIN2C ${SHADER_FILE_NAME_WE}_${PROFILE_EXT}
|
||||
)
|
||||
list(APPEND OUTPUTS ${OUTPUT})
|
||||
list(APPEND ALL_OUTPUTS ${OUTPUT})
|
||||
list(APPEND COMMANDS COMMAND bgfx::shaderc ${CLI})
|
||||
endforeach()
|
||||
|
||||
@@ -610,4 +614,8 @@ function(bgfx_compile_shader_to_header)
|
||||
DEPENDS ${ARGS_VARYING_DEF}
|
||||
)
|
||||
endforeach()
|
||||
|
||||
if(DEFINED ARGS_OUT_FILES_VAR)
|
||||
set(${ARGS_OUT_FILES_VAR} ${ALL_OUTPUTS} PARENT_SCOPE)
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
@@ -22,8 +22,11 @@ set_target_properties(
|
||||
OUTPUT_NAME ${BGFX_TOOLS_PREFIX}texturec #
|
||||
)
|
||||
|
||||
if(BGFX_BUILD_TOOLS_TEXTURE AND BGFX_CUSTOM_TARGETS)
|
||||
add_dependencies(tools texturec)
|
||||
if(BGFX_BUILD_TOOLS_TEXTURE)
|
||||
add_executable(bgfx::texturec ALIAS texturec)
|
||||
if(BGFX_CUSTOM_TARGETS)
|
||||
add_dependencies(tools texturec)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ANDROID)
|
||||
|
||||
@@ -22,8 +22,11 @@ set_target_properties(
|
||||
OUTPUT_NAME ${BGFX_TOOLS_PREFIX}bin2c #
|
||||
)
|
||||
|
||||
if(BGFX_BUILD_TOOLS_BIN2C AND BGFX_CUSTOM_TARGETS)
|
||||
add_dependencies(tools bin2c)
|
||||
if(BGFX_BUILD_TOOLS_BIN2C)
|
||||
add_executable(bgfx::bin2c ALIAS bin2c)
|
||||
if(BGFX_CUSTOM_TARGETS)
|
||||
add_dependencies(tools bin2c)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
if(ANDROID)
|
||||
|
||||
Reference in New Issue
Block a user