This commit is contained in:
lenheart 2026-02-16 06:01:11 +08:00
commit 945d65eb18
6 changed files with 40 additions and 0 deletions

8
.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
# Xmake cache
.xmake/
build/
# MacOS Cache
.DS_Store

6
.vscode/compile_commands.json vendored Normal file
View File

@ -0,0 +1,6 @@
[
{
"directory": "/home/lenheart/Game/Frostbite2D",
"arguments": ["/usr/bin/g++", "-c", "-m64", "-fvisibility=hidden", "-fvisibility-inlines-hidden", "-O3", "-std=c++17", "-finput-charset=UTF-8", "-fexec-charset=UTF-8", "-DNDEBUG", "-o", "build/.objs/Frostbite2D/linux/x86_64/release/src/main.cpp.o", "src/main.cpp"],
"file": "src/main.cpp"
}]

1
folder-alias.json Normal file
View File

@ -0,0 +1 @@
{}

View File

@ -0,0 +1 @@
{}

6
src/main.cpp Normal file
View File

@ -0,0 +1,6 @@
#include <iostream>
int main(int argc, char **argv) {
std::cout << "hello world!" << std::endl;
return 0;
}

18
xmake.lua Normal file
View File

@ -0,0 +1,18 @@
set_project("Frostbite2D")
set_version("1.0.0")
set_license("MIT")
-- 语言和编码设置
set_languages("c++17")
set_encodings("utf-8")
add_rules("mode.debug", "mode.release")
local host_plat = os.host()
local target_plat = get_config("plat") or host_plat
local supported_plats = {mingw = true, windows = true, linux = true, macosx = true, switch = true}
target("Frostbite2D")
set_kind("binary")
add_files("src/*.cpp")