mirror of
				https://github.com/nicbarker/clay.git
				synced 2025-11-04 00:26:17 +00:00 
			
		
		
		
	Add os detection for lib import
This commit is contained in:
		
							parent
							
								
									115b82a81f
								
							
						
					
					
						commit
						4b16ae7920
					
				| 
						 | 
				
			
			@ -2,7 +2,18 @@ package clay
 | 
			
		|||
 | 
			
		||||
import "core:c"
 | 
			
		||||
import "core:strings"
 | 
			
		||||
foreign import Clay "clay.a"
 | 
			
		||||
 | 
			
		||||
when ODIN_OS == .Windows {
 | 
			
		||||
    foreign import Clay "windows/clay.lib"
 | 
			
		||||
} else when ODIN_OS == .Linux {
 | 
			
		||||
    foreign import Clay "linux/libclay.a"
 | 
			
		||||
} else when ODIN_OS == .Darwin {
 | 
			
		||||
    when ODIN_ARCH == .arm64 {
 | 
			
		||||
        foreign import Clay "macos-arm64/clay.a"
 | 
			
		||||
    } else {
 | 
			
		||||
        foreign import Clay "macos/clay.a"
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
String :: struct {
 | 
			
		||||
    length: c.int,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in a new issue