Compare commits

...

23 Commits

Author SHA1 Message Date
loanselot
146a9f43b0 Merge pull request #121 from bkaradzic/ci-fix-2
Add IOKit for Metal backend
2022-01-31 20:15:14 +03:00
e-erdal
9f3943b829 Link IOKit + CoreFoundation 2022-01-31 19:38:44 +03:00
e-erdal
f81d8ee146 Add IOKit for Metal backend 2022-01-31 19:16:08 +03:00
e-erdal
d65bbd523e Merge branches 'dependabot/submodules/bimg-9d6af16', 'dependabot/submodules/bgfx-cd2030c' and 'dependabot/submodules/bx-c969169' of https://github.com/bkaradzic/bgfx.cmake 2022-01-31 18:44:22 +03:00
dependabot[bot]
d3449c2f68 Bump bimg from 9e4d2b1 to 9d6af16
Bumps [bimg](https://github.com/bkaradzic/bimg) from `9e4d2b1` to `9d6af16`.
- [Release notes](https://github.com/bkaradzic/bimg/releases)
- [Commits](9e4d2b167f...9d6af16116)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-17 16:14:11 +00:00
dependabot[bot]
0745f23a13 Bump bgfx from 932d2f2 to cd2030c
Bumps [bgfx](https://github.com/bkaradzic/bgfx) from `932d2f2` to `cd2030c`.
- [Release notes](https://github.com/bkaradzic/bgfx/releases)
- [Commits](932d2f21e7...cd2030cc11)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-17 16:14:10 +00:00
dependabot[bot]
0424ae3763 Bump bx from 51c3264 to c969169
Bumps [bx](https://github.com/bkaradzic/bx) from `51c3264` to `c969169`.
- [Release notes](https://github.com/bkaradzic/bx/releases)
- [Commits](51c3264846...c969169fc1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2022-01-17 16:14:07 +00:00
Sandy Carter
7e7a6795a1 Use string compare for library type 2021-12-23 13:52:18 -05:00
Sandy Carter
a01e8e043f bgfx: Add debug config required in bx headers since bx is private 2021-10-30 10:14:58 -04:00
loanselot
5205429de2 Merge pull request #79 from bkaradzic/ci-fix
Add definition type
2021-10-28 12:00:14 +03:00
e-erdal
25f2107994 Add definition type 2021-10-28 11:16:14 +03:00
loanselot
75b9076904 Merge pull request #78 from bkaradzic/dependabot/submodules/bgfx-932d2f2
Bump bgfx from `6573fc4` to `932d2f2`
2021-10-28 11:06:55 +03:00
loanselot
de4c88ac51 Merge pull request #76 from bkaradzic/dependabot/submodules/bimg-9e4d2b1
Bump bimg from `6693de0` to `9e4d2b1`
2021-10-28 11:06:48 +03:00
loanselot
d575656458 Merge pull request #75 from bkaradzic/dependabot/submodules/bx-51c3264
Bump bx from `11c3c5e` to `51c3264`
2021-10-28 11:06:41 +03:00
e-erdal
d3260f172c Add definition for BX_CONFIG_DEBUG 2021-10-28 11:06:14 +03:00
dependabot[bot]
f290d91828 Bump bgfx from 6573fc4 to 932d2f2
Bumps [bgfx](https://github.com/bkaradzic/bgfx) from `6573fc4` to `932d2f2`.
- [Release notes](https://github.com/bkaradzic/bgfx/releases)
- [Commits](6573fc44a8...932d2f21e7)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-27 16:12:45 +00:00
dependabot[bot]
23577764fe Bump bimg from 6693de0 to 9e4d2b1
Bumps [bimg](https://github.com/bkaradzic/bimg) from `6693de0` to `9e4d2b1`.
- [Release notes](https://github.com/bkaradzic/bimg/releases)
- [Commits](6693de0e50...9e4d2b167f)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-26 16:15:23 +00:00
dependabot[bot]
ec90e950f1 Bump bx from 11c3c5e to 51c3264
Bumps [bx](https://github.com/bkaradzic/bx) from `11c3c5e` to `51c3264`.
- [Release notes](https://github.com/bkaradzic/bx/releases)
- [Commits](11c3c5e615...51c3264846)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-26 16:15:21 +00:00
loanselot
8a301010d7 Merge pull request #73 from bkaradzic/dependabot/submodules/bx-11c3c5e
Bump bx from `f324ffa` to `11c3c5e`
2021-10-23 07:15:32 +03:00
loanselot
29888bfb88 Merge pull request #72 from bkaradzic/dependabot/submodules/bgfx-6573fc4
Bump bgfx from `ffeba57` to `6573fc4`
2021-10-23 07:15:25 +03:00
e-erdal
0133fc5cca Remove bounds 2021-10-23 06:39:13 +03:00
dependabot[bot]
8a1d4fe3b1 Bump bx from f324ffa to 11c3c5e
Bumps [bx](https://github.com/bkaradzic/bx) from `f324ffa` to `11c3c5e`.
- [Release notes](https://github.com/bkaradzic/bx/releases)
- [Commits](f324ffad46...11c3c5e615)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-22 16:11:49 +00:00
dependabot[bot]
3dc17e4d12 Bump bgfx from ffeba57 to 6573fc4
Bumps [bgfx](https://github.com/bkaradzic/bgfx) from `ffeba57` to `6573fc4`.
- [Release notes](https://github.com/bkaradzic/bgfx/releases)
- [Commits](ffeba57b8a...6573fc44a8)

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

Signed-off-by: dependabot[bot] <support@github.com>
2021-10-21 14:19:10 +00:00
10 changed files with 30 additions and 26 deletions

View File

@@ -75,11 +75,10 @@ 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
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 Debug
cmake --build "${{ env.CMAKE_BUILD_DIR }}" --target install --config Release
- uses: actions/upload-artifact@v2
with:

1
.gitignore vendored
View File

@@ -13,3 +13,4 @@ install_manifest.txt
generated/*
!generated/*.in
cmake_install.cmake
.cache/

View File

@@ -28,7 +28,6 @@ option( BGFX_INSTALL_EXAMPLES "Install examples and their runtimes." OF
option( BGFX_CUSTOM_TARGETS "Include convenience custom targets." ON )
option( BGFX_AMALGAMATED "Amalgamated bgfx build for faster compilation" OFF )
option( BX_AMALGAMATED "Amalgamated bx build for faster compilation" OFF )
option( BGFX_CONFIG_DEBUG "Enables debug configuration on all builds" OFF )
option( BGFX_CONFIG_RENDERER_WEBGPU "Enables the webgpu renderer" OFF )
set( BGFX_OPENGL_VERSION "" CACHE STRING "Specify minimum opengl version" )

2
bgfx

Submodule bgfx updated: ffeba57b8a...cd2030cc11

2
bimg

Submodule bimg updated: 6693de0e50...9d6af16116

2
bx

Submodule bx updated: f324ffad46...c969169fc1

View File

@@ -40,7 +40,11 @@ else()
endif()
# Create the bgfx target
add_library( bgfx ${BGFX_LIBRARY_TYPE} ${BGFX_SOURCES} )
if(BGFX_LIBRARY_TYPE STREQUAL STATIC)
add_library( bgfx STATIC ${BGFX_SOURCES} )
else()
add_library( bgfx SHARED ${BGFX_SOURCES} )
endif()
if(BGFX_CONFIG_RENDERER_WEBGPU)
include(cmake/3rdparty/webgpu.cmake)
@@ -52,12 +56,6 @@ if(BGFX_CONFIG_RENDERER_WEBGPU)
endif()
endif()
# Enable BGFX_CONFIG_DEBUG in Debug configuration
target_compile_definitions( bgfx PRIVATE "$<$<CONFIG:Debug>:BGFX_CONFIG_DEBUG=1>" )
if(BGFX_CONFIG_DEBUG)
target_compile_definitions( bgfx PRIVATE BGFX_CONFIG_DEBUG=1)
endif()
if( NOT ${BGFX_OPENGL_VERSION} STREQUAL "" )
target_compile_definitions( bgfx PRIVATE BGFX_CONFIG_RENDERER_OPENGL_MIN_VERSION=${BGFX_OPENGL_VERSION} )
endif()
@@ -71,6 +69,14 @@ if( MSVC )
target_compile_definitions( bgfx PRIVATE "_CRT_SECURE_NO_WARNINGS" )
endif()
# Add debug config required in bx headers since bx is private
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
target_compile_definitions( bgfx PUBLIC "BX_CONFIG_DEBUG=1" )
else()
target_compile_definitions( bgfx PUBLIC "BX_CONFIG_DEBUG=0" )
endif()
# Includes
target_include_directories( bgfx
PRIVATE
@@ -86,15 +92,20 @@ target_link_libraries( bgfx PRIVATE bx bimg )
# Frameworks required on iOS, tvOS and macOS
if( ${CMAKE_SYSTEM_NAME} MATCHES iOS|tvOS )
target_link_libraries (bgfx PUBLIC "-framework OpenGLES -framework Metal -framework UIKit -framework CoreGraphics -framework QuartzCore")
target_link_libraries (bgfx PUBLIC
"-framework OpenGLES -framework Metal -framework UIKit -framework CoreGraphics -framework QuartzCore -framework IOKit -framework CoreFoundation")
elseif( APPLE )
find_library( COCOA_LIBRARY Cocoa )
find_library( METAL_LIBRARY Metal )
find_library( QUARTZCORE_LIBRARY QuartzCore )
find_library( IOKIT_LIBRARY IOKit )
find_library( COREFOUNDATION_LIBRARY CoreFoundation )
mark_as_advanced( COCOA_LIBRARY )
mark_as_advanced( METAL_LIBRARY )
mark_as_advanced( QUARTZCORE_LIBRARY )
target_link_libraries( bgfx PUBLIC ${COCOA_LIBRARY} ${METAL_LIBRARY} ${QUARTZCORE_LIBRARY} )
mark_as_advanced( IOKIT_LIBRARY )
mark_as_advanced( COREFOUNDATION_LIBRARY )
target_link_libraries( bgfx PUBLIC ${COCOA_LIBRARY} ${METAL_LIBRARY} ${QUARTZCORE_LIBRARY} ${IOKIT_LIBRARY} ${COREFOUNDATION_LIBRARY} )
endif()
if( UNIX AND NOT APPLE AND NOT EMSCRIPTEN AND NOT ANDROID )

View File

@@ -67,9 +67,10 @@ target_compile_definitions( bx PUBLIC "__STDC_LIMIT_MACROS" )
target_compile_definitions( bx PUBLIC "__STDC_FORMAT_MACROS" )
target_compile_definitions( bx PUBLIC "__STDC_CONSTANT_MACROS" )
target_compile_definitions( bx PRIVATE "$<$<CONFIG:Debug>:BX_CONFIG_DEBUG=1>" )
if(BGFX_CONFIG_DEBUG)
target_compile_definitions( bx PRIVATE BX_CONFIG_DEBUG=1)
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
target_compile_definitions( bx PUBLIC "BX_CONFIG_DEBUG=1" )
else()
target_compile_definitions( bx PUBLIC "BX_CONFIG_DEBUG=0" )
endif()
# Additional dependencies on Unix

View File

@@ -21,13 +21,6 @@ configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/generated/shader.cpp.in
target_sources( bgfx-shader INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/generated/shader.cpp )
target_include_directories( bgfx-shader INTERFACE ${BGFX_DIR}/include )
add_library( bgfx-bounds INTERFACE )
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/generated/bounds.cpp.in
${CMAKE_CURRENT_BINARY_DIR}/generated/bounds.cpp )
target_sources( bgfx-bounds INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/generated/bounds.cpp )
target_include_directories( bgfx-bounds INTERFACE ${BGFX_DIR}/include )
target_include_directories( bgfx-bounds INTERFACE ${BGFX_DIR}/examples/common )
# Frameworks required on OS X
if( ${CMAKE_SYSTEM_NAME} MATCHES Darwin )
find_library( COCOA_LIBRARY Cocoa )

View File

@@ -15,7 +15,7 @@ include( cmake/3rdparty/meshoptimizer.cmake )
add_executable( geometryc ${BGFX_DIR}/tools/geometryc/geometryc.cpp )
target_compile_definitions( geometryc PRIVATE "-D_CRT_SECURE_NO_WARNINGS" )
set_target_properties( geometryc PROPERTIES FOLDER "bgfx/tools" )
target_link_libraries( geometryc bx bgfx-bounds bgfx-vertexlayout meshoptimizer )
target_link_libraries( geometryc bx bgfx-vertexlayout meshoptimizer )
if( BGFX_CUSTOM_TARGETS )
add_dependencies( tools geometryc )
endif()