diff --git a/.gitignore b/.gitignore index 3797f16..6b95918 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,34 @@ # Binary Files Binaries/ - -# ImGui State Files - -imgui.ini +Intermediate/ # Cargo Files Cargo.lock + +# FFI Bindings + Source/Library.h +# Visual Studio Project Files + +.vs/ + +*.sln +*.vcxproj +*.filters +*.user + +# CMake Project Files + +Makefile + +# Xcode Project Files + +*.xcodeproj +*.xcworkspace + # Mac OSX .DS_Store diff --git a/GenerateProjectFiles.bat b/GenerateProjectFiles.bat new file mode 100644 index 0000000..89264b0 --- /dev/null +++ b/GenerateProjectFiles.bat @@ -0,0 +1 @@ +call .\Premake\Windows\premake5.exe vs2019 diff --git a/GenerateProjectFiles.command b/GenerateProjectFiles.command new file mode 100644 index 0000000..9a08811 --- /dev/null +++ b/GenerateProjectFiles.command @@ -0,0 +1,3 @@ +#!/bin/zsh + +sudo ./Premake/Mac/premake5 xcode4 diff --git a/GenerateProjectFiles.sh b/GenerateProjectFiles.sh new file mode 100644 index 0000000..5bd571e --- /dev/null +++ b/GenerateProjectFiles.sh @@ -0,0 +1,3 @@ +#!/bin/bash + +sudo ./Premake/Linux/premake5 gmake2 diff --git a/Library.code-workspace b/Library.code-workspace index 8739f76..fe1b157 100644 --- a/Library.code-workspace +++ b/Library.code-workspace @@ -6,7 +6,8 @@ ], "settings": { "files.associations": { - "*.toml": "properties" - } + "*.sln": "properties", + "*.toml": "properties" + } } } diff --git a/Premake/LICENSE.txt b/Premake/LICENSE.txt new file mode 100644 index 0000000..f445f59 --- /dev/null +++ b/Premake/LICENSE.txt @@ -0,0 +1,27 @@ +Copyright (c) 2003-2019 Jason Perkins and individual contributors. +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + + 3. Neither the name of Premake nor the names of its contributors may be + used to endorse or promote products derived from this software without + specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR +SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/Premake/Linux/premake5 b/Premake/Linux/premake5 new file mode 100644 index 0000000..2fd412d Binary files /dev/null and b/Premake/Linux/premake5 differ diff --git a/Premake/Mac/premake5 b/Premake/Mac/premake5 new file mode 100644 index 0000000..d192618 Binary files /dev/null and b/Premake/Mac/premake5 differ diff --git a/Premake/Windows/premake5.exe b/Premake/Windows/premake5.exe new file mode 100644 index 0000000..f081fe1 Binary files /dev/null and b/Premake/Windows/premake5.exe differ diff --git a/premake5.lua b/premake5.lua new file mode 100644 index 0000000..908801f --- /dev/null +++ b/premake5.lua @@ -0,0 +1,97 @@ +workspace "Library" + architecture "x64" + + configurations + { + "debug", + "release" + } + +outputDir = "%{cfg.buildcfg}" + +project "Cpp" + location "Examples/Cpp" + kind "ConsoleApp" + language "C++" + + targetdir ("Binaries/" .. outputDir) + objdir ("Intermediate/") + + files + { + "Examples/%{prj.name}/**.h", + "Examples/%{prj.name}/**.cpp", + } + + includedirs + { + "Source" + } + + libdirs + { + "Binaries/%{cfg.buildcfg}" + } + + filter "system:windows" + cppdialect "C++17" + staticruntime "On" + systemversion "latest" + + links + { + "Library.dll.lib" + } + + filter "configurations:debug" + runtime "Debug" + buildoptions "/MDd" + symbols "on" + + filter "configurations:release" + runtime "Release" + buildoptions "/MD" + optimize "on" + +project "C" + location "Examples/C" + kind "ConsoleApp" + language "C" + + targetdir ("Binaries/" .. outputDir) + objdir ("Intermediate/") + + files + { + "Examples/%{prj.name}/**.h", + "Examples/%{prj.name}/**.c", + } + + includedirs + { + "Source" + } + + libdirs + { + "Binaries/%{cfg.buildcfg}" + } + + filter "system:windows" + staticruntime "On" + systemversion "latest" + + links + { + "Library.dll.lib" + } + + filter "configurations:debug" + runtime "Debug" + buildoptions "/MDd" + symbols "on" + + filter "configurations:release" + runtime "Release" + buildoptions "/MD" + optimize "on"