compile: add mingw xmake compile arg
This commit is contained in:
		
							parent
							
								
									1bf2550248
								
							
						
					
					
						commit
						de084c146d
					
				
							
								
								
									
										16
									
								
								xmake.lua
									
									
									
									
									
								
							
							
						
						
									
										16
									
								
								xmake.lua
									
									
									
									
									
								
							@ -3,10 +3,26 @@ set_languages("c++17")
 | 
				
			|||||||
if is_plat("windows") then
 | 
					if is_plat("windows") then
 | 
				
			||||||
	add_cxxflags("/source-charset:utf-8")
 | 
						add_cxxflags("/source-charset:utf-8")
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
 | 
					if is_plat("mingw") then
 | 
				
			||||||
 | 
						add_cxxflags("-Wno-unused-variable -finput-charset=utf-8 -fexec-charset=gbk")
 | 
				
			||||||
 | 
					end
 | 
				
			||||||
if is_mode("debug") then
 | 
					if is_mode("debug") then
 | 
				
			||||||
    set_suffixname("d")
 | 
					    set_suffixname("d")
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
add_includedirs(path.join(os.scriptdir(), "include"), {public = true})
 | 
					add_includedirs(path.join(os.scriptdir(), "include"), {public = true})
 | 
				
			||||||
target("ofen")
 | 
					target("ofen")
 | 
				
			||||||
 | 
						add_options("boost")
 | 
				
			||||||
	set_kind("static")
 | 
						set_kind("static")
 | 
				
			||||||
	add_files("src/*.cpp")
 | 
						add_files("src/*.cpp")
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					option("boost")
 | 
				
			||||||
 | 
						boost_root_dir = os.getenv("BOOST_HEADER_DIR")
 | 
				
			||||||
 | 
						boost_lib_dir = os.getenv("BOOST_LIB_DIR")
 | 
				
			||||||
 | 
						boost_libs = os.getenv("BOOST_LIBS")
 | 
				
			||||||
 | 
						add_includedirs(boost_root_dir)
 | 
				
			||||||
 | 
						print(boost_root_dir)
 | 
				
			||||||
 | 
						add_defines("USE_BOOST_FILESYSTEM")
 | 
				
			||||||
 | 
						add_linkdirs(boost_lib_dir)
 | 
				
			||||||
 | 
						print(boost_lib_dir)
 | 
				
			||||||
 | 
						add_links(boost_libs)
 | 
				
			||||||
 | 
						print(boost_libs)
 | 
				
			||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user