Add Premake to GenerateProject Files

This commit is contained in:
GuilhermeWerner
2021-01-21 12:44:45 -03:00
parent 5435fdfba2
commit b40ede9ba5
10 changed files with 156 additions and 6 deletions

26
.gitignore vendored
View File

@ -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

1
GenerateProjectFiles.bat Normal file
View File

@ -0,0 +1 @@
call .\Premake\Windows\premake5.exe vs2019

View File

@ -0,0 +1,3 @@
#!/bin/zsh
sudo ./Premake/Mac/premake5 xcode4

3
GenerateProjectFiles.sh Normal file
View File

@ -0,0 +1,3 @@
#!/bin/bash
sudo ./Premake/Linux/premake5 gmake2

View File

@ -6,7 +6,8 @@
],
"settings": {
"files.associations": {
"*.toml": "properties"
}
"*.sln": "properties",
"*.toml": "properties"
}
}
}

27
Premake/LICENSE.txt Normal file
View File

@ -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.

BIN
Premake/Linux/premake5 Normal file

Binary file not shown.

BIN
Premake/Mac/premake5 Normal file

Binary file not shown.

Binary file not shown.

97
premake5.lua Normal file
View File

@ -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"