Fixed OSX build

This commit is contained in:
Joshua Brookover
2017-02-22 20:00:55 -06:00
parent 0f5207089d
commit 8823f63b09
3 changed files with 4 additions and 4 deletions

View File

@@ -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()

View File

@@ -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()

View File

@@ -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()