2019-06-23 22:00:18 +02:00
workspace " BigBaseV2 "
architecture " x64 "
startproject " BigBaseV2 "
configurations
{
" Debug " ,
" Release " ,
" Dist "
}
outputdir = " %{cfg.buildcfg} "
IncludeDir = { }
IncludeDir [ " fmtlib " ] = " vendor/fmtlib/include "
IncludeDir [ " json " ] = " vendor/json/single_include "
IncludeDir [ " MinHook " ] = " vendor/MinHook/include "
IncludeDir [ " ImGui " ] = " vendor/ImGui "
IncludeDir [ " ImGuiImpl " ] = " vendor/ImGui/examples "
2020-02-22 18:37:42 -05:00
IncludeDir [ " g3log " ] = " vendor/g3log/src "
2019-06-23 22:00:18 +02:00
CppVersion = " C++17 "
MsvcToolset = " v142 "
WindowsSdkVersion = " 10.0 "
function DeclareMSVCOptions ( )
filter " system:windows "
staticruntime " Off "
2020-02-22 18:37:42 -05:00
floatingpoint " Fast "
vectorextensions " AVX2 "
2019-06-23 22:00:18 +02:00
systemversion ( WindowsSdkVersion )
toolset ( MsvcToolset )
cppdialect ( CppVersion )
defines
{
" _CRT_SECURE_NO_WARNINGS " ,
" NOMINMAX " ,
" WIN32_LEAN_AND_MEAN " ,
" _WIN32_WINNT=0x601 " -- Support Windows 7
}
disablewarnings
{
" 4100 " , -- C4100: unreferenced formal parameter
" 4201 " , -- C4201: nameless struct/union
" 4307 " -- C4307: integral constant overflow
}
end
2020-02-22 18:37:42 -05:00
function file_exists ( name )
local f = io.open ( name , " r " )
if f ~= nil then io.close ( f ) return true else return false end
end
2019-06-23 22:00:18 +02:00
function DeclareDebugOptions ( )
filter " configurations:Debug "
defines { " _DEBUG " }
symbols " On "
filter " not configurations:Debug "
defines { " NDEBUG " }
end
project " ImGui "
location " vendor/%{prj.name} "
kind " StaticLib "
language " C++ "
targetdir ( " bin/lib/ " .. outputdir )
objdir ( " bin/lib/int/ " .. outputdir .. " /%{prj.name} " )
files
{
" vendor/%{prj.name}/imgui.cpp " ,
" vendor/%{prj.name}/imgui_demo.cpp " ,
" vendor/%{prj.name}/imgui_draw.cpp " ,
" vendor/%{prj.name}/imgui_widgets.cpp " ,
" vendor/%{prj.name}/examples/imgui_impl_dx11.cpp " ,
" vendor/%{prj.name}/examples/imgui_impl_win32.cpp "
}
includedirs
{
" vendor/%{prj.name} "
}
DeclareMSVCOptions ( )
DeclareDebugOptions ( )
project " fmtlib "
location " vendor/%{prj.name} "
kind " StaticLib "
language " C++ "
targetdir ( " bin/lib/ " .. outputdir )
objdir ( " bin/lib/int/ " .. outputdir .. " /%{prj.name} " )
files
{
" vendor/%{prj.name}/include/**.h " ,
" vendor/%{prj.name}/src/**.cc "
}
includedirs
{
" vendor/%{prj.name}/include "
}
DeclareMSVCOptions ( )
DeclareDebugOptions ( )
2020-02-22 18:37:42 -05:00
project " MinHook "
2019-06-23 22:00:18 +02:00
location " vendor/%{prj.name} "
kind " StaticLib "
2020-02-22 18:37:42 -05:00
language " C "
2019-06-23 22:00:18 +02:00
targetdir ( " bin/lib/ " .. outputdir )
objdir ( " bin/lib/int/ " .. outputdir .. " /%{prj.name} " )
files
{
2020-02-22 18:37:42 -05:00
" vendor/%{prj.name}/include/**.h " ,
" vendor/%{prj.name}/src/**.h " ,
" vendor/%{prj.name}/src/**.c "
2019-06-23 22:00:18 +02:00
}
DeclareMSVCOptions ( )
DeclareDebugOptions ( )
2020-02-22 18:37:42 -05:00
project " g3log "
2019-06-23 22:00:18 +02:00
location " vendor/%{prj.name} "
kind " StaticLib "
2020-02-22 18:37:42 -05:00
language " C++ "
2019-06-23 22:00:18 +02:00
targetdir ( " bin/lib/ " .. outputdir )
objdir ( " bin/lib/int/ " .. outputdir .. " /%{prj.name} " )
2020-02-22 18:37:42 -05:00
includedirs
{
" vendor/%{prj.name}/src "
}
2019-06-23 22:00:18 +02:00
2020-02-22 18:37:42 -05:00
if ( file_exists ( " vendor \\ g3log \\ src \\ g3log \\ generated_definitions.hpp " ) == false ) then
file = io.open ( " vendor \\ g3log \\ src \\ g3log \\ generated_definitions.hpp " , " w " )
2020-02-22 20:47:17 -05:00
if ( file == nil ) then
premake.error ( " Failed to locate vendor directories. Try doing git pull --recurse-submodules. " )
end
2020-02-22 18:37:42 -05:00
file : write ( " // AUTO GENERATED MACRO DEFINITIONS FOR G3LOG \n \n \n /* ========================================================================== \n *2015 by KjellKod.cc. This is PUBLIC DOMAIN to use at your own risk and comes \n * with no warranties. This code is yours to share, use and modify with no \n \n *strings attached and no restrictions or obligations. \n * \n * For more information see g3log/LICENSE or refer refer to http://unlicense.org \n \n *============================================================================*/ \n #pragma once \n \n \n // CMake induced definitions below. See g3log/Options.cmake for details. " ) ;
end
2019-06-23 22:00:18 +02:00
files
{
2020-02-22 18:37:42 -05:00
" vendor/%{prj.name}/src/**.hpp " ,
" vendor/%{prj.name}/src/**.cpp "
2019-06-23 22:00:18 +02:00
}
2020-02-22 18:37:42 -05:00
removefiles
{
" vendor/%{prj.name}/src/crashhandler_unix.cpp "
}
2019-06-23 22:00:18 +02:00
DeclareMSVCOptions ( )
DeclareDebugOptions ( )
project " BigBaseV2 "
location " BigBaseV2 "
kind " SharedLib "
language " C++ "
targetdir ( " bin/ " .. outputdir )
objdir ( " bin/int/ " .. outputdir .. " /%{prj.name} " )
PrecompiledHeaderInclude = " common.hpp "
PrecompiledHeaderSource = " %{prj.name}/src/common.cpp "
files
{
" %{prj.name}/src/**.hpp " ,
2020-02-22 18:37:42 -05:00
" %{prj.name}/src/**.h " ,
2019-06-23 22:00:18 +02:00
" %{prj.name}/src/**.cpp " ,
" %{prj.name}/src/**.asm "
}
includedirs
{
" %{IncludeDir.fmtlib} " ,
" %{IncludeDir.json} " ,
" %{IncludeDir.MinHook} " ,
" %{IncludeDir.ImGui} " ,
" %{IncludeDir.ImGuiImpl} " ,
2020-02-22 18:37:42 -05:00
" %{IncludeDir.g3log} " ,
2019-06-23 22:00:18 +02:00
" %{prj.name}/src "
}
libdirs
{
" bin/lib "
}
links
{
" fmtlib " ,
" MinHook " ,
" ImGui " ,
2020-02-22 18:37:42 -05:00
" g3log "
2019-06-23 22:00:18 +02:00
}
pchheader " %{PrecompiledHeaderInclude} "
pchsource " %{PrecompiledHeaderSource} "
forceincludes
{
" %{PrecompiledHeaderInclude} "
}
DeclareMSVCOptions ( )
DeclareDebugOptions ( )
flags { " NoImportLib " , " Maps " }
filter " configurations:Debug "
2020-02-22 18:37:42 -05:00
flags { " LinkTimeOptimization " , " MultiProcessorCompile " }
2020-02-22 21:02:57 -05:00
editandcontinue " Off "
2019-06-23 22:00:18 +02:00
defines { " BIGBASEV2_DEBUG " }
filter " configurations:Release "
2020-02-22 18:37:42 -05:00
flags { " LinkTimeOptimization " , " NoManifest " , " MultiProcessorCompile " }
2019-06-23 22:00:18 +02:00
defines { " BIGBASEV2_RELEASE " }
optimize " speed "
filter " configurations:Dist "
2020-02-22 18:37:42 -05:00
flags { " LinkTimeOptimization " , " FatalWarnings " , " NoManifest " , " MultiProcessorCompile " }
2019-06-23 22:00:18 +02:00
defines { " BIGBASEV2_DIST " }
optimize " speed "