Compare commits

...

5 Commits

Author SHA1 Message Date
dependabot[bot]
fba0379121 build(deps): bump bgfx from bea82a1 to 6f36b4f
Bumps [bgfx](https://github.com/bkaradzic/bgfx) from `bea82a1` to `6f36b4f`.
- [Release notes](https://github.com/bkaradzic/bgfx/releases)
- [Commits](bea82a1343...6f36b4fb3a)

---
updated-dependencies:
- dependency-name: bgfx
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-02-09 19:58:33 -05:00
Jamil Halabi
a6cfe968a5 Updated to the latest bgfx 2023-01-22 09:31:31 -05:00
Sandy Carter
0479a929a7 example: Fix for android 2023-01-22 08:38:49 -05:00
Sandy Carter
e5fea62b02 tests: Enable tools tests on android 2023-01-22 08:38:49 -05:00
Sandy Carter
0a11910c2a actions: Add android cross compile test 2023-01-22 08:38:49 -05:00
8 changed files with 81 additions and 16 deletions

View File

@@ -8,7 +8,7 @@ on:
branches: [ master ]
jobs:
job:
native:
name: ${{ matrix.os }} ${{ matrix.cc }}
runs-on: ${{ matrix.os }}
strategy:
@@ -61,3 +61,44 @@ jobs:
- name: Build examples
run: |
cmake --build "${{ env.CMAKE_BUILD_DIR }}" --target examples
cross-android:
name: cross-android
runs-on: ubuntu-latest
strategy:
fail-fast: false
env:
# Indicates the CMake build directory where project files and binaries are being produced.
CMAKE_BUILD_DIR: ${{ github.workspace }}/build/
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Install Linux dependencies
run: |
sudo apt-get update
sudo apt install -y libgl1-mesa-dev
if: matrix.os == 'ubuntu-latest'
# Setup the build machine with the most recent versions of CMake and Ninja. Both are cached if not already: on subsequent runs both will be quickly restored from GitHub cache service.
- uses: lukka/get-cmake@latest
# On Windows runners, let's ensure to have the Developer Command Prompt environment setup correctly. As used here the Developer Command Prompt created is targeting x64 and using the default the Windows SDK.
- uses: ilammy/msvc-dev-cmd@v1
# Run CMake to generate Ninja project files
- name: Generate project files
run: |
cmake -B "${{ env.CMAKE_BUILD_DIR }}" -GNinja -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=${ANDROID_NDK_HOME}/build/cmake/android.toolchain.cmake
# Build the whole project with Ninja (which is spawn by CMake).
- name: Build
run: |
cmake --build "${{ env.CMAKE_BUILD_DIR }}"
# Build the examples which are excluded from all
- name: Build examples
run: |
cmake --build "${{ env.CMAKE_BUILD_DIR }}" --target examples

2
bgfx

Submodule bgfx updated: 5f435ea56b...6f36b4fb3a

2
bimg

Submodule bimg updated: 1af90543ca...7afa241925

2
bx

Submodule bx updated: aed1086c48...fa1411e4aa

View File

@@ -138,6 +138,7 @@ file(
${SPIRV_TOOLS}/source/val/validate_primitives.cpp
${SPIRV_TOOLS}/source/val/validate_ray_query.cpp
${SPIRV_TOOLS}/source/val/validate_ray_tracing.cpp
${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_type.cpp

View File

@@ -157,10 +157,15 @@ function(add_example ARG_NAME)
find_package(SDL2 REQUIRED)
target_link_libraries(example-${ARG_NAME} PUBLIC ${SDL2_LIBRARIES})
target_compile_definitions(example-${ARG_NAME} PUBLIC ENTRY_CONFIG_USE_SDL)
elseif(UNIX AND NOT APPLE)
elseif(UNIX AND NOT APPLE AND NOT ANDROID)
target_link_libraries(example-${ARG_NAME} PUBLIC X11)
endif()
if(ANDROID)
target_include_directories(example-${ARG_NAME} PRIVATE ${BGFX_DIR}/3rdparty/native_app_glue)
target_link_libraries(example-${ARG_NAME} INTERFACE android EGL GLESv2)
endif()
if(BGFX_BUILD_EXAMPLES)
if(IOS OR WIN32)
# on iOS we need to build a bundle so have to copy the data rather than symlink
@@ -205,12 +210,16 @@ function(add_example ARG_NAME)
endif()
else()
if(BGFX_INSTALL_EXAMPLES)
add_executable(example-${ARG_NAME} WIN32 ${SOURCES})
if(ANDROID)
add_library(example-${ARG_NAME} SHARED)
else()
add_executable(example-${ARG_NAME} WIN32 EXCLUDE_FROM_ALL ${SOURCES})
add_executable(example-${ARG_NAME} WIN32)
endif()
target_link_libraries(example-${ARG_NAME} example-common)
if(NOT BGFX_INSTALL_EXAMPLES)
set_property(TARGET example-${ARG_NAME} PROPERTY EXCLUDE_FROM_ALL ON)
endif()
target_sources(example-${ARG_NAME} PUBLIC ${SOURCES})
target_link_libraries(example-${ARG_NAME} PUBLIC example-common)
configure_debugging(example-${ARG_NAME} WORKING_DIR ${BGFX_DIR}/examples/runtime)
if(MSVC)
set_target_properties(example-${ARG_NAME} PROPERTIES LINK_FLAGS "/ENTRY:\"mainCRTStartup\"")
@@ -230,8 +239,10 @@ function(add_example ARG_NAME)
endif()
endif()
target_compile_definitions(
example-${ARG_NAME} PRIVATE "-D_CRT_SECURE_NO_WARNINGS" "-D__STDC_FORMAT_MACROS"
"-DENTRY_CONFIG_IMPLEMENT_MAIN=1"
example-${ARG_NAME}
PRIVATE "-D_CRT_SECURE_NO_WARNINGS" #
"-D__STDC_FORMAT_MACROS" #
"-DENTRY_CONFIG_IMPLEMENT_MAIN=1" #
)
# Configure shaders

View File

@@ -8,7 +8,11 @@
# 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/>.
add_executable(geometryv)
if(ANDROID)
add_library(geometryv SHARED)
else()
add_executable(geometryv)
endif()
# Grab the geometryv source files
file(GLOB_RECURSE GEOMETRYV_SOURCES #
@@ -16,7 +20,7 @@ file(GLOB_RECURSE GEOMETRYV_SOURCES #
)
target_sources(geometryv PRIVATE ${GEOMETRYV_SOURCES})
target_link_libraries(geometryv example-common)
target_link_libraries(geometryv PRIVATE example-common)
set_target_properties(
geometryv PROPERTIES FOLDER "bgfx/tools" #
OUTPUT_NAME ${BGFX_TOOLS_PREFIX}geometryv #
@@ -26,7 +30,9 @@ if(BGFX_BUILD_TOOLS_GEOMETRY AND BGFX_CUSTOM_TARGETS)
add_dependencies(tools geometryv)
endif()
if(EMSCRIPTEN)
if(ANDROID)
set_property(TARGET geometryv PROPERTY PREFIX "")
elseif(EMSCRIPTEN)
target_link_options(geometryv PRIVATE -sMAX_WEBGL_VERSION=2)
elseif(IOS)
set_target_properties(geometryv PROPERTIES MACOSX_BUNDLE ON MACOSX_BUNDLE_GUI_IDENTIFIER geometryv)

View File

@@ -8,7 +8,11 @@
# 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/>.
add_executable(texturev)
if(ANDROID)
add_library(texturev SHARED)
else()
add_executable(texturev)
endif()
# Grab the texturev source files
file(GLOB_RECURSE TEXTUREV_SOURCES #
@@ -26,7 +30,9 @@ if(BGFX_BUILD_TOOLS_TEXTURE AND BGFX_CUSTOM_TARGETS)
add_dependencies(tools texturev)
endif()
if(EMSCRIPTEN)
if(ANDROID)
set_property(TARGET texturev PROPERTY PREFIX "")
elseif(EMSCRIPTEN)
target_link_options(texturev PRIVATE -sMAX_WEBGL_VERSION=2)
elseif(IOS)
set_target_properties(texturev PROPERTIES MACOSX_BUNDLE ON MACOSX_BUNDLE_GUI_IDENTIFIER texturev)