mirror of
https://github.com/bkaradzic/bgfx.cmake.git
synced 2026-02-17 21:12:35 +01:00
Compare commits
20 Commits
v1.115.795
...
v1.115.806
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1b74840891 | ||
|
|
b193a31651 | ||
|
|
146a9f43b0 | ||
|
|
9f3943b829 | ||
|
|
f81d8ee146 | ||
|
|
d65bbd523e | ||
|
|
d3449c2f68 | ||
|
|
0745f23a13 | ||
|
|
0424ae3763 | ||
|
|
7e7a6795a1 | ||
|
|
a01e8e043f | ||
|
|
5205429de2 | ||
|
|
25f2107994 | ||
|
|
75b9076904 | ||
|
|
de4c88ac51 | ||
|
|
d575656458 | ||
|
|
d3260f172c | ||
|
|
f290d91828 | ||
|
|
23577764fe | ||
|
|
ec90e950f1 |
3
.github/workflows/release.yml
vendored
3
.github/workflows/release.yml
vendored
@@ -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
1
.gitignore
vendored
@@ -13,3 +13,4 @@ install_manifest.txt
|
||||
generated/*
|
||||
!generated/*.in
|
||||
cmake_install.cmake
|
||||
.cache/
|
||||
@@ -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
2
bgfx
Submodule bgfx updated: 6573fc44a8...9f04292f40
2
bimg
2
bimg
Submodule bimg updated: 6693de0e50...9d6af16116
2
bx
2
bx
Submodule bx updated: 11c3c5e615...c969169fc1
@@ -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 )
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user