2024-07-31 10:48:28 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								shared_module("vulkan","engine")
							 | 
						
					
						
							
								
									
										
										
										
											2024-12-12 22:20:56 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    add_headerfiles("include/**.h")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    add_files("src/**.cpp", "include/volk/volk.c", "include/imgui/*.cpp")
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-17 18:01:21 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    add_packages("vulkansdk", {public = true})
							 | 
						
					
						
							
								
									
										
										
										
											2024-08-23 22:13:05 +08:00
										 
									 
								 
							 | 
							
								
									
										
									
								
							 | 
							
								
							 | 
							
							
								    add_dependency("engine", {public = true})
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    on_load(function (target)
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        if is_plat("windows") then 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            target:add("defines", "VK_USE_PLATFORM_WIN32_KHR=1")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        elseif is_plat("linux") then 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            target:add("defines", "VK_USE_PLATFORM_XLIB_KHR=1")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        elseif is_plat("macosx") then 
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								            target:add("defines", "VK_USE_PLATFORM_MACOS_MVK=1")
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								        end
							 | 
						
					
						
							| 
								
							 | 
							
								
							 | 
							
								
							 | 
							
							
								    end)
							 |