mirror of
https://github.com/bkaradzic/bgfx.cmake.git
synced 2026-02-17 21:12:35 +01:00
Fixed OSX build
This commit is contained in:
@@ -51,7 +51,7 @@ if( APPLE )
|
||||
target_link_libraries( bgfx PUBLIC ${COCOA_LIBRARY} ${METAL_LIBRARY} ${QUARTZCORE_LIBRARY} )
|
||||
endif()
|
||||
|
||||
if( UNIX )
|
||||
if( UNIX AND NOT APPLE )
|
||||
target_link_libraries( bgfx PUBLIC GL )
|
||||
endif()
|
||||
|
||||
@@ -69,7 +69,7 @@ if( NOT APPLE )
|
||||
endif()
|
||||
|
||||
# Exclude glx context on non-unix
|
||||
if( NOT UNIX )
|
||||
if( NOT UNIX OR APPLE )
|
||||
set_source_files_properties( ${BGFX_DIR}/src/glcontext_glx.cpp PROPERTIES HEADER_FILE_ONLY ON )
|
||||
endif()
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ elseif( APPLE )
|
||||
endif()
|
||||
|
||||
# Threads
|
||||
if( UNIX )
|
||||
if( UNIX AND NOT APPLE )
|
||||
find_package( Threads )
|
||||
target_link_libraries( bx ${CMAKE_THREAD_LIBS_INIT} dl )
|
||||
endif()
|
||||
|
||||
@@ -106,7 +106,7 @@ function( add_example ARG_NAME )
|
||||
target_compile_definitions( example-${ARG_NAME} PRIVATE "-D_CRT_SECURE_NO_WARNINGS" "-D__STDC_FORMAT_MACROS" )
|
||||
target_include_directories( example-${ARG_NAME} PUBLIC ${BGFX_DIR}/examples/common )
|
||||
target_link_libraries( example-${ARG_NAME} PUBLIC bgfx ib-compress ocornut-imgui )
|
||||
if( UNIX )
|
||||
if( UNIX AND NOT APPLE )
|
||||
target_link_libraries( example-${ARG_NAME} PUBLIC X11 )
|
||||
endif()
|
||||
else()
|
||||
|
||||
Reference in New Issue
Block a user