sokol on linux
This commit is contained in:
		@@ -234,7 +234,16 @@ set(SOKOL_SRC
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
if(APPLE)
 | 
					if(APPLE)
 | 
				
			||||||
	add_definitions(-DSOKOL_METAL)
 | 
						add_definitions(-DSOKOL_METAL)
 | 
				
			||||||
 | 
					elseif(WIN32)
 | 
				
			||||||
 | 
						add_definitions(-DSOKOL_D3D11)
 | 
				
			||||||
 | 
					elseif(LINUX)
 | 
				
			||||||
 | 
						add_definitions(-DSOKOL_GLCORE33)
 | 
				
			||||||
 | 
					endif()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if(APPLE)
 | 
				
			||||||
    set(SOKOL_SRC ${SOKOL_SRC} ${EXAMPLE_DIR}/sokol/sokol.m)
 | 
					    set(SOKOL_SRC ${SOKOL_SRC} ${EXAMPLE_DIR}/sokol/sokol.m)
 | 
				
			||||||
 | 
					else()
 | 
				
			||||||
 | 
						set(SOKOL_SRC ${SOKOL_SRC} ${EXAMPLE_DIR}/sokol/sokol.c)
 | 
				
			||||||
endif()
 | 
					endif()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
add_executable(sokol ${SOKOL_SRC})
 | 
					add_executable(sokol ${SOKOL_SRC})
 | 
				
			||||||
@@ -250,6 +259,8 @@ if(APPLE)
 | 
				
			|||||||
		"-framework MetalKit"
 | 
							"-framework MetalKit"
 | 
				
			||||||
		"-framework AudioToolbox"
 | 
							"-framework AudioToolbox"
 | 
				
			||||||
	)
 | 
						)
 | 
				
			||||||
 | 
					elseif(LINUX)
 | 
				
			||||||
 | 
						target_link_libraries(sokol X11 GL m dl asound)
 | 
				
			||||||
endif()
 | 
					endif()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
target_include_directories(sokol PRIVATE include)
 | 
					target_include_directories(sokol PRIVATE include)
 | 
				
			||||||
@@ -501,4 +512,4 @@ foreach(TIC80_OUTPUT ${TIC80_OUTPUTS})
 | 
				
			|||||||
		target_link_libraries(${TIC80_OUTPUT} ${GTK_LIBRARIES})
 | 
							target_link_libraries(${TIC80_OUTPUT} ${GTK_LIBRARIES})
 | 
				
			||||||
	endif()
 | 
						endif()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
endforeach()
 | 
					endforeach()
 | 
				
			||||||
 
 | 
				
			|||||||
							
								
								
									
										6
									
								
								examples/sokol/sokol.c
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								examples/sokol/sokol.c
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,6 @@
 | 
				
			|||||||
 | 
					#define SOKOL_IMPL
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#include "sokol_app.h"
 | 
				
			||||||
 | 
					#include "sokol_gfx.h"
 | 
				
			||||||
 | 
					#include "sokol_time.h"
 | 
				
			||||||
 | 
					#include "sokol_audio.h"
 | 
				
			||||||
		Reference in New Issue
	
	Block a user