mirror of https://github.com/stenzek/duckstation
				
				
				
			
			You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			29 lines
		
	
	
		
			603 B
		
	
	
	
		
			CMake
		
	
			
		
		
	
	
			29 lines
		
	
	
		
			603 B
		
	
	
	
		
			CMake
		
	
set(SRCS
 | 
						|
  include/glad/gl.h
 | 
						|
  include/KHR/khrplatform.h
 | 
						|
  src/gl.c
 | 
						|
)
 | 
						|
 | 
						|
# Linking as a static library breaks on macOS, see https://github.com/libigl/libigl/issues/751
 | 
						|
if(APPLE)
 | 
						|
  add_library(glad OBJECT ${SRCS})
 | 
						|
else()
 | 
						|
  add_library(glad ${SRCS})
 | 
						|
endif()
 | 
						|
 | 
						|
target_include_directories(glad PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/include")
 | 
						|
target_link_libraries(glad PRIVATE Threads::Threads "${CMAKE_DL_LIBS}")
 | 
						|
 | 
						|
if(WIN32)
 | 
						|
  target_sources(glad PRIVATE
 | 
						|
    include/glad/wgl.h
 | 
						|
    src/wgl.c
 | 
						|
  )
 | 
						|
else()
 | 
						|
  target_sources(glad PRIVATE
 | 
						|
    include/EGL/eglplatform.h
 | 
						|
    include/glad/egl.h
 | 
						|
    src/egl.c
 | 
						|
  )
 | 
						|
endif()
 |