Compare commits
2 Commits
d057669dd0
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
| 5638772ec2 | |||
|
|
d0789d2ef7 |
@@ -5,82 +5,66 @@ Name = "Glfw"
|
||||
TargetType = "BeefLib"
|
||||
StartupObject = "Glfw.Program"
|
||||
|
||||
[Dependencies]
|
||||
corlib = "*"
|
||||
"CxxBuildTool.git" = {Git = "https://git.unicon-gmbh.de/Rune/CxxBuildTool.git"}
|
||||
|
||||
[Configs.Debug.Win32]
|
||||
LibPaths = ["$(BuildDir)/glfw3.lib"]
|
||||
PreBuildCmds = ["ReadFile(\"$(ProjectDir)/CxxBuilderPath.txt\", \"CxxBuilderPath\")", "Execute(\"$(Var CxxBuilderPath) *.c -- \\\"cflags=-D_GLFW_WIN32\\\" \\\"src=$(ProjectDir)/glfw/src\\\" \\\"builddir=$(BuildDir)\\\" target=$(TargetTriple) config=$(Configuration) output=glfw3\")"]
|
||||
|
||||
[Configs.Debug.Win64]
|
||||
LibPaths = ["$(BuildDir)/glfw3.lib"]
|
||||
PreBuildCmds = ["ReadFile(\"$(ProjectDir)/CxxBuilderPath.txt\", \"CxxBuilderPath\")", "Execute(\"$(Var CxxBuilderPath) *.c -- \\\"cflags=-D_GLFW_WIN32\\\" \\\"src=$(ProjectDir)/glfw/src\\\" \\\"builddir=$(BuildDir)\\\" target=$(TargetTriple) config=$(Configuration) output=glfw3\")"]
|
||||
|
||||
[Configs.Debug.Linux32]
|
||||
LibPaths = ["$(BuildDir)/glfw3.a"]
|
||||
PreBuildCmds = ["ReadFile(\"$(ProjectDir)/CxxBuilderPath.txt\", \"CxxBuilderPath\")", "Execute(\"$(Var CxxBuilderPath) *.c -- \\\"cflags=-D_GLFW_WAYLAND -D_GLFW_X11\\\" \\\"src=$(ProjectDir)/glfw/src\\\" \\\"builddir=$(BuildDir)\\\" target=$(TargetTriple) config=$(Configuration) output=glfw3\")"]
|
||||
|
||||
[Configs.Debug.Linux64]
|
||||
LibPaths = ["$(BuildDir)/glfw3.a"]
|
||||
PreBuildCmds = ["ReadFile(\"$(ProjectDir)/CxxBuilderPath.txt\", \"CxxBuilderPath\")", "Execute(\"$(Var CxxBuilderPath) *.c -- \\\"cflags=-D_GLFW_WAYLAND -D_GLFW_X11\\\" \\\"src=$(ProjectDir)/glfw/src\\\" \\\"builddir=$(BuildDir)\\\" target=$(TargetTriple) config=$(Configuration) output=glfw3\")"]
|
||||
|
||||
[Configs.Debug.macOS]
|
||||
LibPaths = ["$(BuildDir)/glfw3.a"]
|
||||
PreBuildCmds = ["ReadFile(\"$(ProjectDir)/CxxBuilderPath.txt\", \"CxxBuilderPath\")", "Execute(\"$(Var CxxBuilderPath) *.c -- \\\"cflags=-D_GLFW_COCOA\\\" \\\"src=$(ProjectDir)/glfw/src\\\" \\\"builddir=$(BuildDir)\\\" target=$(TargetTriple) config=$(Configuration) output=glfw3\")"]
|
||||
|
||||
[Configs.Release.Win32]
|
||||
LibPaths = ["$(BuildDir)/glfw3.lib"]
|
||||
PreBuildCmds = ["ReadFile(\"$(ProjectDir)/CxxBuilderPath.txt\", \"CxxBuilderPath\")", "Execute(\"$(Var CxxBuilderPath) *.c -- \\\"cflags=-D_GLFW_WIN32\\\" \\\"src=$(ProjectDir)/glfw/src\\\" \\\"builddir=$(BuildDir)\\\" target=$(TargetTriple) config=$(Configuration) output=glfw3\")"]
|
||||
|
||||
[Configs.Release.Win64]
|
||||
LibPaths = ["$(BuildDir)/glfw3.lib"]
|
||||
PreBuildCmds = ["ReadFile(\"$(ProjectDir)/CxxBuilderPath.txt\", \"CxxBuilderPath\")", "Execute(\"$(Var CxxBuilderPath) *.c -- \\\"cflags=-D_GLFW_WIN32\\\" \\\"src=$(ProjectDir)/glfw/src\\\" \\\"builddir=$(BuildDir)\\\" target=$(TargetTriple) config=$(Configuration) output=glfw3\")"]
|
||||
|
||||
[Configs.Release.Linux32]
|
||||
LibPaths = ["$(BuildDir)/glfw3.lib"]
|
||||
PreBuildCmds = ["ReadFile(\"$(ProjectDir)/CxxBuilderPath.txt\", \"CxxBuilderPath\")", "Execute(\"$(Var CxxBuilderPath) *.c -- \\\"cflags=-D_GLFW_WAYLAND -D_GLFW_X11\\\" \\\"src=$(ProjectDir)/glfw/src\\\" \\\"builddir=$(BuildDir)\\\" target=$(TargetTriple) config=$(Configuration) output=glfw3\")"]
|
||||
LibPaths = ["$(BuildDir)/glfw3.a"]
|
||||
|
||||
[Configs.Release.Linux64]
|
||||
LibPaths = ["$(BuildDir)/glfw3.lib"]
|
||||
PreBuildCmds = ["ReadFile(\"$(ProjectDir)/CxxBuilderPath.txt\", \"CxxBuilderPath\")", "Execute(\"$(Var CxxBuilderPath) *.c -- \\\"cflags=-D_GLFW_WAYLAND -D_GLFW_X11\\\" \\\"src=$(ProjectDir)/glfw/src\\\" \\\"builddir=$(BuildDir)\\\" target=$(TargetTriple) config=$(Configuration) output=glfw3\")"]
|
||||
LibPaths = ["$(BuildDir)/glfw3.a"]
|
||||
|
||||
[Configs.Release.macOS]
|
||||
LibPaths = ["$(BuildDir)/glfw3.a"]
|
||||
PreBuildCmds = ["ReadFile(\"$(ProjectDir)/CxxBuilderPath.txt\", \"CxxBuilderPath\")", "Execute(\"$(Var CxxBuilderPath) *.c -- \\\"cflags=-D_GLFW_COCOA\\\" \\\"src=$(ProjectDir)/glfw/src\\\" \\\"builddir=$(BuildDir)\\\" target=$(TargetTriple) config=$(Configuration) output=glfw3\")"]
|
||||
|
||||
[Configs.Paranoid.Win32]
|
||||
LibPaths = ["$(BuildDir)/glfw3.lib"]
|
||||
PreBuildCmds = ["ReadFile(\"$(ProjectDir)/CxxBuilderPath.txt\", \"CxxBuilderPath\")", "Execute(\"$(Var CxxBuilderPath) *.c -- \\\"cflags=-D_GLFW_WIN32\\\" \\\"src=$(ProjectDir)/glfw/src\\\" \\\"builddir=$(BuildDir)\\\" target=$(TargetTriple) config=$(Configuration) output=glfw3\")"]
|
||||
|
||||
[Configs.Paranoid.Win64]
|
||||
LibPaths = ["$(BuildDir)/glfw3.lib"]
|
||||
PreBuildCmds = ["ReadFile(\"$(ProjectDir)/CxxBuilderPath.txt\", \"CxxBuilderPath\")", "Execute(\"$(Var CxxBuilderPath) *.c -- \\\"cflags=-D_GLFW_WIN32\\\" \\\"src=$(ProjectDir)/glfw/src\\\" \\\"builddir=$(BuildDir)\\\" target=$(TargetTriple) config=$(Configuration) output=glfw3\")"]
|
||||
|
||||
[Configs.Paranoid.Linux32]
|
||||
LibPaths = ["$(BuildDir)/glfw3.lib"]
|
||||
PreBuildCmds = ["ReadFile(\"$(ProjectDir)/CxxBuilderPath.txt\", \"CxxBuilderPath\")", "Execute(\"$(Var CxxBuilderPath) *.c -- \\\"cflags=-D_GLFW_WAYLAND -D_GLFW_X11\\\" \\\"src=$(ProjectDir)/glfw/src\\\" \\\"builddir=$(BuildDir)\\\" target=$(TargetTriple) config=$(Configuration) output=glfw3\")"]
|
||||
LibPaths = ["$(BuildDir)/glfw3.a"]
|
||||
|
||||
[Configs.Paranoid.Linux64]
|
||||
LibPaths = ["$(BuildDir)/glfw3.lib"]
|
||||
PreBuildCmds = ["ReadFile(\"$(ProjectDir)/CxxBuilderPath.txt\", \"CxxBuilderPath\")", "Execute(\"$(Var CxxBuilderPath) *.c -- \\\"cflags=-D_GLFW_WAYLAND -D_GLFW_X11\\\" \\\"src=$(ProjectDir)/glfw/src\\\" \\\"builddir=$(BuildDir)\\\" target=$(TargetTriple) config=$(Configuration) output=glfw3\")"]
|
||||
LibPaths = ["$(BuildDir)/glfw3.a"]
|
||||
|
||||
[Configs.Paranoid.macOS]
|
||||
LibPaths = ["$(BuildDir)/glfw3.a"]
|
||||
PreBuildCmds = ["ReadFile(\"$(ProjectDir)/CxxBuilderPath.txt\", \"CxxBuilderPath\")", "Execute(\"$(Var CxxBuilderPath) *.c -- \\\"cflags=-D_GLFW_COCOA\\\" \\\"src=$(ProjectDir)/glfw/src\\\" \\\"builddir=$(BuildDir)\\\" target=$(TargetTriple) config=$(Configuration) output=glfw3\")"]
|
||||
|
||||
[Configs.Test.Win32]
|
||||
LibPaths = ["$(BuildDir)/glfw3.lib"]
|
||||
PreBuildCmds = ["ReadFile(\"$(ProjectDir)/CxxBuilderPath.txt\", \"CxxBuilderPath\")", "Execute(\"$(Var CxxBuilderPath) *.c -- \\\"cflags=-D_GLFW_WIN32\\\" \\\"src=$(ProjectDir)/glfw/src\\\" \\\"builddir=$(BuildDir)\\\" target=$(TargetTriple) config=$(Configuration) output=glfw3\")"]
|
||||
|
||||
[Configs.Test.Win64]
|
||||
LibPaths = ["$(BuildDir)/glfw3.lib"]
|
||||
PreBuildCmds = ["ReadFile(\"$(ProjectDir)/CxxBuilderPath.txt\", \"CxxBuilderPath\")", "Execute(\"$(Var CxxBuilderPath) *.c -- \\\"cflags=-D_GLFW_WIN32\\\" \\\"src=$(ProjectDir)/glfw/src\\\" \\\"builddir=$(BuildDir)\\\" target=$(TargetTriple) config=$(Configuration) output=glfw3\")"]
|
||||
|
||||
[Configs.Test.Linux32]
|
||||
LibPaths = ["$(BuildDir)/glfw3.lib"]
|
||||
PreBuildCmds = ["ReadFile(\"$(ProjectDir)/CxxBuilderPath.txt\", \"CxxBuilderPath\")", "Execute(\"$(Var CxxBuilderPath) *.c -- \\\"cflags=-D_GLFW_WAYLAND -D_GLFW_X11\\\" \\\"src=$(ProjectDir)/glfw/src\\\" \\\"builddir=$(BuildDir)\\\" target=$(TargetTriple) config=$(Configuration) output=glfw3\")"]
|
||||
LibPaths = ["$(BuildDir)/glfw3.a"]
|
||||
|
||||
[Configs.Test.Linux64]
|
||||
LibPaths = ["$(BuildDir)/glfw3.lib"]
|
||||
PreBuildCmds = ["ReadFile(\"$(ProjectDir)/CxxBuilderPath.txt\", \"CxxBuilderPath\")", "Execute(\"$(Var CxxBuilderPath) *.c -- \\\"cflags=-D_GLFW_WAYLAND -D_GLFW_X11\\\" \\\"src=$(ProjectDir)/glfw/src\\\" \\\"builddir=$(BuildDir)\\\" target=$(TargetTriple) config=$(Configuration) output=glfw3\")"]
|
||||
LibPaths = ["$(BuildDir)/glfw3.a"]
|
||||
|
||||
[Configs.Test.macOS]
|
||||
LibPaths = ["$(BuildDir)/glfw3.a"]
|
||||
PreBuildCmds = ["ReadFile(\"$(ProjectDir)/CxxBuilderPath.txt\", \"CxxBuilderPath\")", "Execute(\"$(Var CxxBuilderPath) *.c -- \\\"cflags=-D_GLFW_COCOA\\\" \\\"src=$(ProjectDir)/glfw/src\\\" \\\"builddir=$(BuildDir)\\\" target=$(TargetTriple) config=$(Configuration) output=glfw3\")"]
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
FileVersion = 1
|
||||
Projects = {"Glfw" = {Path = "."}}
|
||||
ExtraPlatforms = ["Linux32", "Linux64", "macOS"]
|
||||
|
||||
[Workspace]
|
||||
StartupProject = "Glfw"
|
||||
|
||||
[Projects]
|
||||
Glfw = {Path = "."}
|
||||
"CxxBuildTool.git" = {Git = "https://git.unicon-gmbh.de/Rune/CxxBuildTool.git"}
|
||||
|
||||
6
BeefSpace_Lock.toml
Normal file
6
BeefSpace_Lock.toml
Normal file
@@ -0,0 +1,6 @@
|
||||
FileVersion = 1
|
||||
|
||||
[Locks."CxxBuildTool.git".Git]
|
||||
URL = "https://git.unicon-gmbh.de/Rune/CxxBuildTool.git"
|
||||
Tag = ""
|
||||
Hash = "b64a6221b8cb235a5e040c8597365dabeef849ca"
|
||||
@@ -1,67 +1,10 @@
|
||||
FileVersion = 1
|
||||
Dependencies = {corlib = "*", "Clang-C.git" = "*", "Cpp2Beef.git" = {Git = "https://git.unicon-gmbh.de/BeefBindings/Cpp2Beef.git"}}
|
||||
|
||||
[Project]
|
||||
Name = "Glfw.Setup"
|
||||
StartupObject = "Glfw.Setup.Program"
|
||||
DefaultNamespace = "Glfw.Setup"
|
||||
|
||||
[Configs.Debug.Win32]
|
||||
PreBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt ../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Debug.Win64]
|
||||
PreBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt ../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Debug.Linux32]
|
||||
PreBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt ../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Debug.Linux64]
|
||||
PreBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt ../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Debug.macOS]
|
||||
PreBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt ../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Release.Win32]
|
||||
PreBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt ../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Release.Win64]
|
||||
PreBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt ../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Release.Linux32]
|
||||
PreBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt ../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Release.Linux64]
|
||||
PreBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt ../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Release.macOS]
|
||||
PreBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt ../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Paranoid.Win32]
|
||||
PreBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt ../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Paranoid.Win64]
|
||||
PreBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt ../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Paranoid.Linux32]
|
||||
PreBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt ../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Paranoid.Linux64]
|
||||
PreBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt ../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Paranoid.macOS]
|
||||
PreBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt ../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Test.Win32]
|
||||
PreBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt ../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Test.Win64]
|
||||
PreBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt ../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Test.Linux32]
|
||||
PreBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt ../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Test.Linux64]
|
||||
PreBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt ../CxxBuilderPath.txt"]
|
||||
|
||||
[Configs.Test.macOS]
|
||||
PreBuildCmds = ["cp $(ProjectDir Cpp2Beef.git)/CxxBuilder/dist/CxxBuilderPath.txt ../CxxBuilderPath.txt"]
|
||||
[Dependencies]
|
||||
corlib = "*"
|
||||
"Clang-C.git" = "*"
|
||||
"Cpp2Beef.git" = {Git = "https://git.unicon-gmbh.de/Rune/Cpp2Beef.git"}
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
FileVersion = 1
|
||||
Projects = {"Glfw.Setup" = {Path = "."}, "Cpp2Beef.git" = {Git = "https://git.unicon-gmbh.de/BeefBindings/Cpp2Beef.git"}}
|
||||
ExtraPlatforms = ["Linux32", "Linux64", "macOS"]
|
||||
|
||||
[Workspace]
|
||||
StartupProject = "Glfw.Setup"
|
||||
|
||||
[Projects]
|
||||
"Glfw.Setup" = {Path = "."}
|
||||
"Cpp2Beef.git" = {Git = "https://git.unicon-gmbh.de/Rune/Cpp2Beef.git"}
|
||||
|
||||
@@ -21,23 +21,6 @@ class GlfwGenerator : Cpp2BeefGenerator, this(Span<char8*> args)
|
||||
|
||||
namespace Glfw;
|
||||
|
||||
static class Glfw
|
||||
{
|
||||
public struct Bool : c_int
|
||||
{
|
||||
public static operator Self(bool b) => b ? True : False;
|
||||
public static operator bool(Self b) => b != False;
|
||||
}
|
||||
|
||||
// Vulkan
|
||||
public typealias PFN_vkGetInstanceProcAddr = void*;
|
||||
public struct VkInstance : int;
|
||||
public struct VkPhysicalDevice : int;
|
||||
public typealias VkResult = c_int;
|
||||
public struct VkAllocationCallbacks;
|
||||
public struct VkSurfaceKHR : uint64;
|
||||
}
|
||||
|
||||
|
||||
""") ~ delete _;
|
||||
|
||||
|
||||
17
src/Glfw.bf
17
src/Glfw.bf
@@ -5,23 +5,6 @@ using System.Interop;
|
||||
|
||||
namespace Glfw;
|
||||
|
||||
static class Glfw
|
||||
{
|
||||
public struct Bool : c_int
|
||||
{
|
||||
public static operator Self(bool b) => b ? True : False;
|
||||
public static operator bool(Self b) => b != False;
|
||||
}
|
||||
|
||||
// Vulkan
|
||||
public typealias PFN_vkGetInstanceProcAddr = void*;
|
||||
public struct VkInstance : int;
|
||||
public struct VkPhysicalDevice : int;
|
||||
public typealias VkResult = c_int;
|
||||
public struct VkAllocationCallbacks;
|
||||
public struct VkSurfaceKHR : int;
|
||||
}
|
||||
|
||||
static
|
||||
{
|
||||
/*************************************************************************
|
||||
|
||||
34
src/Library.bf
Normal file
34
src/Library.bf
Normal file
@@ -0,0 +1,34 @@
|
||||
using System;
|
||||
using System.Interop;
|
||||
|
||||
using CxxBuildTool;
|
||||
|
||||
namespace Glfw;
|
||||
|
||||
static class Glfw
|
||||
{
|
||||
public struct Bool : c_int
|
||||
{
|
||||
public static operator Self(bool b) => b ? True : False;
|
||||
public static operator bool(Self b) => b != False;
|
||||
}
|
||||
|
||||
// Vulkan
|
||||
public typealias PFN_vkGetInstanceProcAddr = void*;
|
||||
public struct VkInstance : int;
|
||||
public struct VkPhysicalDevice : int;
|
||||
public typealias VkResult = c_int;
|
||||
public struct VkAllocationCallbacks;
|
||||
public struct VkSurfaceKHR : int;
|
||||
|
||||
[OnCompile(.TypeDone)]
|
||||
private static void Build()
|
||||
{
|
||||
if (!Compiler.IsBuilding) return;
|
||||
CxxBuildTool.CMake(
|
||||
Compiler.ProjectDir + "/glfw",
|
||||
Compiler.BuildDir + "/" + Compiler.ProjectName,
|
||||
"-DGLFW_BUILD_EXAMPLES=OFF -DGLFW_BUILD_TESTS=OFF -DGLFW_BUILD_DOCS=OFF -DGLFW_INSTALL=OFF"
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user