mirror of
https://github.com/bkaradzic/bgfx.cmake.git
synced 2026-02-17 21:12:35 +01:00
Compare commits
10 Commits
v1.129.886
...
v1.135.906
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b5e37cd0db | ||
|
|
052d997930 | ||
|
|
a952acef35 | ||
|
|
dddc79f2ee | ||
|
|
fbf0903e50 | ||
|
|
5f3f4f2972 | ||
|
|
bd755d6c91 | ||
|
|
e8a92ffbbe | ||
|
|
657dd62551 | ||
|
|
36a0d1d8d0 |
8
.github/workflows/ci.yml
vendored
8
.github/workflows/ci.yml
vendored
@@ -15,9 +15,9 @@ jobs:
|
||||
name: Check compatibility with minimum cmake version
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
CMAKE_VERSION: 3.10.2
|
||||
CMAKE_VERSION: 3.20.0
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install Linux dependencies
|
||||
@@ -57,7 +57,7 @@ jobs:
|
||||
CC: ${{ matrix.cc }}
|
||||
CXX: ${{ matrix.cxx }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install Linux dependencies
|
||||
@@ -94,7 +94,7 @@ jobs:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install Linux dependencies
|
||||
|
||||
8
.github/workflows/format.yml
vendored
8
.github/workflows/format.yml
vendored
@@ -12,7 +12,7 @@ jobs:
|
||||
name: cmake-format
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.ref }}
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
@@ -21,7 +21,7 @@ jobs:
|
||||
if: startsWith(github.event_name, 'pull_request')
|
||||
- name: Format CMake files
|
||||
id: cmake-format
|
||||
uses: PuneetMatharu/cmake-format-lint-action@main
|
||||
uses: PuneetMatharu/cmake-format-lint-action@v1.0.6
|
||||
with:
|
||||
args: --config-files .cmake-format.py --check
|
||||
# Run only if a PR and cmake-format has failed
|
||||
@@ -31,7 +31,7 @@ jobs:
|
||||
needs: cmake-format-check
|
||||
if: always() && startsWith(github.event_name, 'pull_request') && needs.cmake-format-check.result == 'failure'
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.ref }}
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name }}
|
||||
@@ -40,7 +40,7 @@ jobs:
|
||||
if: startsWith(github.event_name, 'pull_request')
|
||||
- name: Format CMake files
|
||||
id: cmake-format
|
||||
uses: PuneetMatharu/cmake-format-lint-action@v1.0.0
|
||||
uses: PuneetMatharu/cmake-format-lint-action@v1.0.6
|
||||
with:
|
||||
args: --config-files .cmake-format.py --in-place
|
||||
- run: |
|
||||
|
||||
30
.github/workflows/release.yml
vendored
30
.github/workflows/release.yml
vendored
@@ -18,7 +18,7 @@ jobs:
|
||||
sha: ${{ steps.version.outputs.sha }}
|
||||
tag: ${{ steps.version.outputs.tag }}
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
@@ -51,7 +51,7 @@ jobs:
|
||||
CMAKE_INSTALL_DIR: ${{ github.workspace }}/install/
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
- name: Install Linux dependencies
|
||||
@@ -80,7 +80,7 @@ jobs:
|
||||
- name: Build
|
||||
run: |
|
||||
cmake --build "${{ env.CMAKE_BUILD_DIR }}" --target install --config Release
|
||||
- uses: actions/upload-artifact@v3
|
||||
- uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: ${{ matrix.os }}
|
||||
path: ${{ github.workspace }}/install/
|
||||
@@ -93,7 +93,7 @@ jobs:
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
fetch-depth: 0
|
||||
@@ -102,69 +102,69 @@ jobs:
|
||||
find src/bgfx.cmake -name ".git*" -exec rm -rf {} +
|
||||
find src/bgfx.cmake -name ".editorconfig" -delete
|
||||
rm src/bgfx.cmake/.cmake-format.py
|
||||
- uses: actions/download-artifact@v3
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: windows-latest
|
||||
path: ${{ github.workspace }}/install/windows/bgfx.cmake
|
||||
- uses: actions/download-artifact@v3
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: ubuntu-latest
|
||||
path: ${{ github.workspace }}/install/linux/bgfx.cmake
|
||||
- uses: actions/download-artifact@v3
|
||||
- uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: macos-latest
|
||||
path: ${{ github.workspace }}/install/macos/bgfx.cmake
|
||||
- name: Create Source Zip
|
||||
uses: thedoctor0/zip-release@0.7.1
|
||||
uses: thedoctor0/zip-release@0.7.6
|
||||
with:
|
||||
type: 'zip'
|
||||
filename: 'bgfx.cmake.${{ needs.version.outputs.tag }}.zip'
|
||||
directory: 'src'
|
||||
path: 'bgfx.cmake'
|
||||
- name: Create Source Tar
|
||||
uses: thedoctor0/zip-release@0.7.1
|
||||
uses: thedoctor0/zip-release@0.7.6
|
||||
with:
|
||||
type: 'tar'
|
||||
filename: 'bgfx.cmake.${{ needs.version.outputs.tag }}.tar.gz'
|
||||
directory: 'src'
|
||||
path: 'bgfx.cmake'
|
||||
- name: Create Windows Zip
|
||||
uses: thedoctor0/zip-release@0.7.1
|
||||
uses: thedoctor0/zip-release@0.7.6
|
||||
with:
|
||||
type: 'zip'
|
||||
filename: 'bgfx.cmake.binary.windows.${{ needs.version.outputs.tag }}.zip'
|
||||
directory: 'install/windows'
|
||||
path: 'bgfx.cmake'
|
||||
- name: Create Windows Tar
|
||||
uses: thedoctor0/zip-release@0.7.1
|
||||
uses: thedoctor0/zip-release@0.7.6
|
||||
with:
|
||||
type: 'tar'
|
||||
filename: 'bgfx.cmake.binary.windows.${{ needs.version.outputs.tag }}.tar.gz'
|
||||
directory: 'install/windows'
|
||||
path: 'bgfx.cmake'
|
||||
- name: Create Linux Zip
|
||||
uses: thedoctor0/zip-release@0.7.1
|
||||
uses: thedoctor0/zip-release@0.7.6
|
||||
with:
|
||||
type: 'zip'
|
||||
filename: 'bgfx.cmake.binary.linux.${{ needs.version.outputs.tag }}.zip'
|
||||
directory: 'install/linux'
|
||||
path: 'bgfx.cmake'
|
||||
- name: Create Linux Tar
|
||||
uses: thedoctor0/zip-release@0.7.1
|
||||
uses: thedoctor0/zip-release@0.7.6
|
||||
with:
|
||||
type: 'tar'
|
||||
filename: 'bgfx.cmake.binary.linux.${{ needs.version.outputs.tag }}.tar.gz'
|
||||
directory: 'install/linux'
|
||||
path: 'bgfx.cmake'
|
||||
- name: Create MacOS Zip
|
||||
uses: thedoctor0/zip-release@0.7.1
|
||||
uses: thedoctor0/zip-release@0.7.6
|
||||
with:
|
||||
type: 'zip'
|
||||
filename: 'bgfx.cmake.binary.macos.${{ needs.version.outputs.tag }}.zip'
|
||||
directory: 'install/macos'
|
||||
path: 'bgfx.cmake'
|
||||
- name: Create MacOS Tar
|
||||
uses: thedoctor0/zip-release@0.7.1
|
||||
uses: thedoctor0/zip-release@0.7.6
|
||||
with:
|
||||
type: 'tar'
|
||||
filename: 'bgfx.cmake.binary.macos.${{ needs.version.outputs.tag }}.tar.gz'
|
||||
|
||||
@@ -8,12 +8,12 @@
|
||||
# You should have received a copy of the CC0 Public Domain Dedication along with
|
||||
# this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>.
|
||||
|
||||
cmake_minimum_required(VERSION 3.10.2) # version supported by android studio
|
||||
cmake_minimum_required(VERSION 3.20) # C++20 support required
|
||||
project(bgfx)
|
||||
cmake_policy(SET CMP0054 NEW)
|
||||
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
set(CMAKE_CXX_STANDARD 17)
|
||||
set(CMAKE_CXX_STANDARD 20)
|
||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||
set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
|
||||
2
bgfx
2
bgfx
Submodule bgfx updated: de56398919...3a652bbc7a
2
bimg
2
bimg
Submodule bimg updated: c5c7b6e187...bf10ffbb3d
2
bx
2
bx
Submodule bx updated: 01c99ddd09...5dc415ee2e
7
cmake/bgfx/3rdparty/spirv-opt.cmake
vendored
7
cmake/bgfx/3rdparty/spirv-opt.cmake
vendored
@@ -70,6 +70,8 @@ file(
|
||||
${SPIRV_TOOLS}/source/spirv_validator_options.h
|
||||
${SPIRV_TOOLS}/source/table.cpp
|
||||
${SPIRV_TOOLS}/source/table.h
|
||||
${SPIRV_TOOLS}/source/table2.cpp
|
||||
${SPIRV_TOOLS}/source/table2.h
|
||||
${SPIRV_TOOLS}/source/text.cpp
|
||||
${SPIRV_TOOLS}/source/text.h
|
||||
${SPIRV_TOOLS}/source/text_handler.cpp
|
||||
@@ -82,6 +84,7 @@ file(
|
||||
${SPIRV_TOOLS}/source/util/hex_float.h
|
||||
${SPIRV_TOOLS}/source/util/parse_number.cpp
|
||||
${SPIRV_TOOLS}/source/util/parse_number.h
|
||||
${SPIRV_TOOLS}/source/util/status.h
|
||||
${SPIRV_TOOLS}/source/util/string_utils.cpp
|
||||
${SPIRV_TOOLS}/source/util/string_utils.h
|
||||
${SPIRV_TOOLS}/source/util/timer.h
|
||||
@@ -110,12 +113,15 @@ file(
|
||||
${SPIRV_TOOLS}/source/val/validate_execution_limitations.cpp
|
||||
${SPIRV_TOOLS}/source/val/validate_extensions.cpp
|
||||
${SPIRV_TOOLS}/source/val/validate_function.cpp
|
||||
${SPIRV_TOOLS}/source/val/validate_graph.cpp
|
||||
${SPIRV_TOOLS}/source/val/validate_id.cpp
|
||||
${SPIRV_TOOLS}/source/val/validate_image.cpp
|
||||
${SPIRV_TOOLS}/source/val/validate_instruction.cpp
|
||||
${SPIRV_TOOLS}/source/val/validate_interfaces.cpp
|
||||
${SPIRV_TOOLS}/source/val/validate_invalid_type.cpp
|
||||
${SPIRV_TOOLS}/source/val/validate_layout.cpp
|
||||
${SPIRV_TOOLS}/source/val/validate_literals.cpp
|
||||
${SPIRV_TOOLS}/source/val/validate_logical_pointers.cpp
|
||||
${SPIRV_TOOLS}/source/val/validate_logicals.cpp
|
||||
${SPIRV_TOOLS}/source/val/validate_memory.cpp
|
||||
${SPIRV_TOOLS}/source/val/validate_memory_semantics.cpp
|
||||
@@ -129,6 +135,7 @@ file(
|
||||
${SPIRV_TOOLS}/source/val/validate_ray_tracing_reorder.cpp
|
||||
${SPIRV_TOOLS}/source/val/validate_scopes.cpp
|
||||
${SPIRV_TOOLS}/source/val/validate_small_type_uses.cpp
|
||||
${SPIRV_TOOLS}/source/val/validate_tensor.cpp
|
||||
${SPIRV_TOOLS}/source/val/validate_tensor_layout.cpp
|
||||
${SPIRV_TOOLS}/source/val/validate_type.cpp
|
||||
${SPIRV_TOOLS}/source/val/validation_state.cpp
|
||||
|
||||
@@ -19,22 +19,25 @@ if(NOT IS_DIRECTORY ${BGFX_DIR})
|
||||
return()
|
||||
endif()
|
||||
|
||||
if(NOT APPLE)
|
||||
set(BGFX_AMALGAMATED_SOURCE ${BGFX_DIR}/src/amalgamated.cpp)
|
||||
else()
|
||||
set(BGFX_AMALGAMATED_SOURCE ${BGFX_DIR}/src/amalgamated.mm)
|
||||
endif()
|
||||
|
||||
# Grab the bgfx source files
|
||||
file(
|
||||
GLOB
|
||||
BGFX_SOURCES
|
||||
${BGFX_DIR}/src/*.cpp
|
||||
${BGFX_DIR}/src/*.mm
|
||||
${BGFX_DIR}/src/*.h
|
||||
${BGFX_DIR}/include/bgfx/*.h
|
||||
${BGFX_DIR}/include/bgfx/c99/*.h
|
||||
)
|
||||
|
||||
if(APPLE)
|
||||
file(GLOB BGFX_OBJC_SOURCES ${BGFX_DIR}/src/*.mm)
|
||||
list(APPEND BGFX_SOURCES ${BGFX_OBJC_SOURCES})
|
||||
list(REMOVE_ITEM BGFX_SOURCES ${BGFX_DIR}/src/amalgamated.cpp)
|
||||
set(BGFX_AMALGAMATED_SOURCE ${BGFX_DIR}/src/amalgamated.mm)
|
||||
else()
|
||||
set(BGFX_AMALGAMATED_SOURCE ${BGFX_DIR}/src/amalgamated.cpp)
|
||||
endif()
|
||||
|
||||
if(BGFX_AMALGAMATED)
|
||||
set(BGFX_NOBUILD ${BGFX_SOURCES})
|
||||
list(REMOVE_ITEM BGFX_NOBUILD ${BGFX_AMALGAMATED_SOURCE})
|
||||
@@ -43,8 +46,7 @@ if(BGFX_AMALGAMATED)
|
||||
endforeach()
|
||||
else()
|
||||
# Do not build using amalgamated sources
|
||||
set_source_files_properties(${BGFX_DIR}/src/amalgamated.cpp PROPERTIES HEADER_FILE_ONLY ON)
|
||||
set_source_files_properties(${BGFX_DIR}/src/amalgamated.mm PROPERTIES HEADER_FILE_ONLY ON)
|
||||
set_source_files_properties(${BGFX_AMALGAMATED_SOURCE} PROPERTIES HEADER_FILE_ONLY ON)
|
||||
endif()
|
||||
|
||||
# Create the bgfx target
|
||||
|
||||
Reference in New Issue
Block a user