Skip to content

Commit

Permalink
Merge pull request #77 from okwasniewski/feat/visionOS
Browse files Browse the repository at this point in the history
feat: add visionOS scripts
  • Loading branch information
CedricGuillemet authored Aug 27, 2024
2 parents 17e2f84 + 83da388 commit a158200
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion cmake/bgfx.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ target_include_directories( bgfx
target_link_libraries( bgfx PUBLIC bx bimg )

# Frameworks required on iOS, tvOS and macOS
if( ${CMAKE_SYSTEM_NAME} MATCHES iOS|tvOS )
if( ${CMAKE_SYSTEM_NAME} MATCHES iOS|tvOS|visionOS )
target_link_libraries (bgfx PUBLIC
"-framework OpenGLES -framework Metal -framework UIKit -framework CoreGraphics -framework QuartzCore -framework IOKit -framework CoreFoundation")
elseif( APPLE )
Expand Down
2 changes: 2 additions & 0 deletions cmake/bgfxToolUtils.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ function( shaderc_parse ARG_OUT )
list( APPEND CLI "--platform" "asm.js" )
elseif( "${PLATFORM}" STREQUAL "IOS" )
list( APPEND CLI "--platform" "ios" )
elseif( "${PLATFORM}" STREQUAL "VISIONOS" )
list( APPEND CLI "--platform" "visionos" )
elseif( "${PLATFORM}" STREQUAL "LINUX" )
list( APPEND CLI "--platform" "linux" )
elseif( "${PLATFORM}" STREQUAL "NACL" )
Expand Down
4 changes: 2 additions & 2 deletions cmake/examples.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ function( add_example ARG_NAME )
if( BGFX_CUSTOM_TARGETS )
add_dependencies( examples example-${ARG_NAME} )
endif()
if( IOS )
if( IOS OR VISIONOS )
set_target_properties(example-${ARG_NAME} PROPERTIES MACOSX_BUNDLE ON
MACOSX_BUNDLE_GUI_IDENTIFIER example-${ARG_NAME}
MACOSX_BUNDLE_BUNDLE_VERSION 0
Expand All @@ -172,7 +172,7 @@ function( add_example ARG_NAME )
target_compile_definitions( example-${ARG_NAME} PRIVATE "-D_CRT_SECURE_NO_WARNINGS" "-D__STDC_FORMAT_MACROS" "-DENTRY_CONFIG_IMPLEMENT_MAIN=1" )

# Configure shaders
if( NOT ARG_COMMON AND NOT IOS AND NOT EMSCRIPTEN AND NOT ANDROID)
if( NOT ARG_COMMON AND NOT IOS AND NOT VISIONOS AND NOT EMSCRIPTEN AND NOT ANDROID)
foreach( SHADER ${SHADERS} )
add_bgfx_shader( ${SHADER} ${ARG_NAME} )
endforeach()
Expand Down
2 changes: 1 addition & 1 deletion cmake/shared.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ target_sources( bgfx-shader-spirv INTERFACE ${CMAKE_CURRENT_BINARY_DIR}/generate
target_include_directories( bgfx-shader-spirv INTERFACE ${BGFX_DIR}/include )

# Frameworks required on OS X
if( APPLE AND NOT IOS)
if( APPLE AND NOT IOS AND NOT VISIONOS)
find_library( COCOA_LIBRARY Cocoa )
mark_as_advanced( COCOA_LIBRARY )
target_link_libraries( bgfx-vertexdecl INTERFACE ${COCOA_LIBRARY} )
Expand Down

0 comments on commit a158200

Please # to comment.