Advertisement
Masterchoc

Untitled

Jun 17th, 2019
554
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.62 KB | None | 0 0
  1. workspace "Razor"
  2.     architecture "x64"
  3.     startproject "Sandbox"
  4.  
  5.     configurations
  6.     {
  7.         "Debug",
  8.         "Release",
  9.         "Dist"
  10.     }
  11.  
  12. outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
  13.  
  14. IncludeDir = {}
  15. IncludeDir["GLFW"] = "Razor/vendor/GLFW/include"
  16. IncludeDir["Glad"] = "Razor/vendor/Glad/include"
  17. IncludeDir["ImGui"] = "Razor/vendor/imgui"
  18. IncludeDir["glm"] = "Razor/vendor/glm"
  19. IncludeDir["stb"] = "Razor/vendor/stb"
  20. IncludeDir["assimp"] = "Razor/vendor/assimp/include"
  21. IncludeDir["lua"] = "Razor/vendor/lua/include"
  22. IncludeDir["bullet"] = "Razor/vendor/bullet/include"
  23. IncludeDir["openal"] = "Razor/vendor/openal/include"
  24.  
  25. include "Razor/vendor/GLFW"
  26. include "Razor/vendor/Glad"
  27. include "Razor/vendor/ImGui"
  28.  
  29.  
  30. project "Razor"
  31.     location "Razor"
  32.     kind "StaticLib"
  33.     staticruntime "on"
  34.     language "C++"
  35.  
  36.     targetdir ("bin/" .. outputdir .. "/%{prj.name}")
  37.     objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
  38.  
  39.     pchheader "rzpch.h"
  40.     pchsource "Razor/src/rzpch.cpp"
  41.  
  42.     disablewarnings { "4006", "4221" }
  43.  
  44.     files
  45.     {
  46.         "%{prj.name}/src/**.h",
  47.         "%{prj.name}/src/**.cpp",
  48.         "%{prj.name}/vendor/glm/glm/**.hpp",
  49.         "%{prj.name}/vendor/glm/glm/**.inl",
  50.         "%{prj.name}/vendor/assimp/include/**"
  51.     }
  52.  
  53.     includedirs
  54.     {
  55.         "%{prj.name}/src",
  56.         "%{prj.name}/vendor/spdlog/include",
  57.         "%{IncludeDir.GLFW}",
  58.         "%{IncludeDir.Glad}",
  59.         "%{IncludeDir.ImGui}",
  60.         "%{IncludeDir.glm}",
  61.         "%{IncludeDir.stb}",
  62.         "%{IncludeDir.lua}",
  63.         "%{IncludeDir.bullet}",
  64.         "%{IncludeDir.openal}",
  65.         "%{prj.name}/vendor/assimp/include",
  66.         "%{prj.name}/vendor/assimp/build/include"
  67.     }
  68.  
  69.     libdirs {
  70.         "%{prj.name}/vendor/assimp/build/code/Release",
  71.         "%{prj.name}/vendor/lua",
  72.         "%{prj.name}/vendor/bullet/lib",
  73.         "%{prj.name}/vendor/openal"
  74.     }
  75.  
  76.     links
  77.     {
  78.         "GLFW",
  79.         "Glad",
  80.         "ImGui",
  81.         "opengl32.lib",
  82.         "assimp",
  83.         "lua53.lib",
  84.         "OpenAL32.lib"
  85.     }
  86.  
  87.     filter "system:windows"
  88.         cppdialect "C++17"
  89.         staticruntime "On"
  90.         systemversion "latest"
  91.  
  92.         defines
  93.         {
  94.             "IMGUI_API=__declspec(dllexport)",
  95.             "RZ_PLATFORM_WINDOWS",
  96.             "GLFW_INCLUDE_NONE",
  97.             "_CRT_SECURE_NO_WARNINGS"
  98.         }
  99.  
  100.         postbuildcommands
  101.         {
  102.             --"{COPY} %{cfg.buildtarget.relpath} ../bin/" .. outputdir .. "/Sandbox",
  103.             --"{COPY} %{cfg.buildtarget.relpath} ../bin/" .. outputdir .. "/Server",
  104.             "{COPY} ../Razor/vendor/assimp/build/code/Release/assimp.dll ../bin/Release-windows-x86_64/Sandbox",
  105.             "{COPY} ../Razor/vendor/assimp/build/code/Release/assimp.dll ../bin/Debug-windows-x86_64/Sandbox",
  106.             "{COPY} ../Razor/vendor/assimp/build/code/Release/assimp.dll ../bin/Release-windows-x86_64/Server",
  107.             "{COPY} ../Razor/vendor/assimp/build/code/Release/assimp.dll ../bin/Debug-windows-x86_64/Server",
  108.  
  109.             "{COPY} ../Razor/vendor/lua/lua53.dll ../bin/Release-windows-x86_64/Sandbox",
  110.             "{COPY} ../Razor/vendor/lua/lua53.dll ../bin/Debug-windows-x86_64/Sandbox",
  111.             "{COPY} ../Razor/vendor/lua/lua53.dll ../bin/Release-windows-x86_64/Server",
  112.             "{COPY} ../Razor/vendor/lua/lua53.dll ../bin/Debug-windows-x86_64/Server",
  113.  
  114.             "{COPY} ../Razor/vendor/openal/OpenAL32.dll ../bin/Release-windows-x86_64/Sandbox",
  115.             "{COPY} ../Razor/vendor/openal/OpenAL32.dll ../bin/Debug-windows-x86_64/Sandbox",
  116.             "{COPY} ../Razor/vendor/openal/OpenAL32.dll ../bin/Release-windows-x86_64/Server",
  117.             "{COPY} ../Razor/vendor/openal/OpenAL32.dll ../bin/Debug-windows-x86_64/Server"
  118.         }
  119.  
  120.     filter "configurations:Debug"
  121.         defines "RZ_DEBUG"
  122.         buildoptions {"/MTd"}
  123.         symbols "On"
  124.         links {
  125.             "BulletCollision_Debug.lib",
  126.             "BulletDynamics_Debug.lib",
  127.             "BulletSoftBody_Debug.lib",
  128.             "LinearMath_Debug.lib"
  129.         }
  130.        
  131.     filter "configurations:Release"
  132.         defines "RZ_RELEASE"
  133.         runtime "Release"
  134.         optimize "On"
  135.         links {
  136.             "BulletCollision.lib",
  137.             "BulletDynamics.lib",
  138.             "BulletSoftBody.lib",
  139.             "LinearMath.lib"
  140.         }
  141.        
  142.     filter "configurations:Dist"
  143.         defines "RZ_DIST"
  144.         runtime "Release"
  145.         optimize "On"
  146.         links {
  147.             "BulletCollision.lib",
  148.             "BulletDynamics.lib",
  149.             "BulletSoftBody.lib",
  150.             "LinearMath.lib"
  151.         }
  152.  
  153.  
  154. project "Sandbox"
  155.     location "Sandbox"
  156.  
  157.     language "C++"
  158.  
  159.     targetdir ("bin/" .. outputdir .. "/%{prj.name}")
  160.     objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
  161.  
  162.     files
  163.     {
  164.         "%{prj.name}/src/**.h",
  165.         "%{prj.name}/src/**.cpp"
  166.     }
  167.  
  168.     includedirs
  169.     {
  170.         "Razor/vendor/spdlog/include",
  171.         "Razor/src",
  172.         "Razor/vendor",
  173.         "%{IncludeDir.glm}"
  174.     }
  175.  
  176.     links
  177.     {
  178.         "Razor"
  179.     }
  180.  
  181.     filter "system:windows"
  182.         cppdialect "C++17"
  183.         staticruntime "On"
  184.         systemversion "latest"
  185.  
  186.         defines
  187.         {
  188.             "RZ_PLATFORM_WINDOWS"
  189.         }
  190.  
  191.     filter "configurations:Debug"
  192.         defines "RZ_DEBUG"
  193.         kind "ConsoleApp"
  194.         symbols "On"
  195.        
  196.     filter "configurations:Release"
  197.         defines "RZ_RELEASE"
  198.         optimize "On"
  199.         kind "WindowedApp"
  200.         entrypoint "mainCRTStartup"
  201.        
  202.     filter "configurations:Dist"
  203.         defines "RZ_DIST"
  204.         optimize "On"
  205.         kind "WindowedApp"
  206.         entrypoint "mainCRTStartup"
  207.  
  208. project "Server"
  209.     location "Server"
  210.     kind "ConsoleApp"
  211.     language "C++"
  212.  
  213.     targetdir ("bin/" .. outputdir .. "/%{prj.name}")
  214.     objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
  215.  
  216.     files
  217.     {
  218.         "%{prj.name}/src/**.h",
  219.         "%{prj.name}/src/**.cpp"
  220.     }
  221.  
  222.     includedirs
  223.     {
  224.         "Razor/vendor/spdlog/include",
  225.         "Razor/src",
  226.         "Razor/vendor",
  227.         "%{IncludeDir.glm}"
  228.     }
  229.  
  230.     links
  231.     {
  232.         "Razor"
  233.     }
  234.  
  235.     filter "system:windows"
  236.         cppdialect "C++17"
  237.         staticruntime "On"
  238.         systemversion "latest"
  239.  
  240.         defines
  241.         {
  242.             "RZ_PLATFORM_WINDOWS"
  243.         }
  244.  
  245.     filter "configurations:Debug"
  246.         defines "RZ_DEBUG"
  247.         symbols "On"
  248.         buildoptions {"/MTd"}
  249.        
  250.     filter "configurations:Release"
  251.         defines "RZ_RELEASE"
  252.         optimize "On"
  253.        
  254.     filter "configurations:Dist"
  255.         defines "RZ_DIST"
  256.         optimize "On"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement