mirror of
https://github.com/bkaradzic/bgfx.cmake.git
synced 2026-02-17 21:12:35 +01:00
Compare commits
11 Commits
v1.115.796
...
v1.115.806
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1b74840891 | ||
|
|
b193a31651 | ||
|
|
146a9f43b0 | ||
|
|
9f3943b829 | ||
|
|
f81d8ee146 | ||
|
|
d65bbd523e | ||
|
|
d3449c2f68 | ||
|
|
0745f23a13 | ||
|
|
0424ae3763 | ||
|
|
7e7a6795a1 | ||
|
|
a01e8e043f |
2
bgfx
2
bgfx
Submodule bgfx updated: 932d2f21e7...9f04292f40
2
bimg
2
bimg
Submodule bimg updated: 9e4d2b167f...9d6af16116
2
bx
2
bx
Submodule bx updated: 51c3264846...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)
|
||||
@@ -65,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
|
||||
@@ -80,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 )
|
||||
|
||||
Reference in New Issue
Block a user