加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
premake5.lua 3.34 KB
一键复制 编辑 原始数据 按行查看 历史
workspace "Hazel"
architecture "x86_64"
startproject "Hazelnut"
configurations
{
"Debug",
"Release",
"Dist"
}
flags
{
"MultiProcessorCompile"
}
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
-- Include directories relative to root folder (solution directory)
IncludeDir = {}
IncludeDir["GLFW"] = "Hazel/vendor/GLFW/include"
IncludeDir["Glad"] = "Hazel/vendor/Glad/include"
IncludeDir["ImGui"] = "Hazel/vendor/imgui"
IncludeDir["glm"] = "Hazel/vendor/glm"
IncludeDir["stb_image"] = "Hazel/vendor/stb_image"
IncludeDir["entt"] = "Hazel/vendor/entt/include"
group "Dependencies"
include "Hazel/vendor/GLFW"
include "Hazel/vendor/Glad"
include "Hazel/vendor/imgui"
group ""
project "Hazel"
location "Hazel"
kind "StaticLib"
language "C++"
cppdialect "C++17"
staticruntime "on"
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
pchheader "hzpch.h"
pchsource "Hazel/src/hzpch.cpp"
files
{
"%{prj.name}/src/**.h",
"%{prj.name}/src/**.cpp",
"%{prj.name}/vendor/stb_image/**.h",
"%{prj.name}/vendor/stb_image/**.cpp",
"%{prj.name}/vendor/glm/glm/**.hpp",
"%{prj.name}/vendor/glm/glm/**.inl",
}
defines
{
"_CRT_SECURE_NO_WARNINGS",
"GLFW_INCLUDE_NONE"
}
includedirs
{
"%{prj.name}/src",
"%{prj.name}/vendor/spdlog/include",
"%{IncludeDir.GLFW}",
"%{IncludeDir.Glad}",
"%{IncludeDir.ImGui}",
"%{IncludeDir.glm}",
"%{IncludeDir.stb_image}",
"%{IncludeDir.entt}"
}
links
{
"GLFW",
"Glad",
"ImGui",
"opengl32.lib"
}
filter "system:windows"
systemversion "latest"
defines
{
}
filter "configurations:Debug"
defines "HZ_DEBUG"
runtime "Debug"
symbols "on"
filter "configurations:Release"
defines "HZ_RELEASE"
runtime "Release"
optimize "on"
filter "configurations:Dist"
defines "HZ_DIST"
runtime "Release"
optimize "on"
project "Sandbox"
location "Sandbox"
kind "ConsoleApp"
language "C++"
cppdialect "C++17"
staticruntime "on"
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
files
{
"%{prj.name}/src/**.h",
"%{prj.name}/src/**.cpp"
}
includedirs
{
"Hazel/vendor/spdlog/include",
"Hazel/src",
"Hazel/vendor",
"%{IncludeDir.glm}",
"%{IncludeDir.entt}"
}
links
{
"Hazel"
}
filter "system:windows"
systemversion "latest"
filter "configurations:Debug"
defines "HZ_DEBUG"
runtime "Debug"
symbols "on"
filter "configurations:Release"
defines "HZ_RELEASE"
runtime "Release"
optimize "on"
filter "configurations:Dist"
defines "HZ_DIST"
runtime "Release"
optimize "on"
project "Hazelnut"
location "Hazelnut"
kind "ConsoleApp"
language "C++"
cppdialect "C++17"
staticruntime "on"
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
files
{
"%{prj.name}/src/**.h",
"%{prj.name}/src/**.cpp"
}
includedirs
{
"Hazel/vendor/spdlog/include",
"Hazel/src",
"Hazel/vendor",
"%{IncludeDir.glm}",
"%{IncludeDir.entt}"
}
links
{
"Hazel"
}
filter "system:windows"
systemversion "latest"
filter "configurations:Debug"
defines "HZ_DEBUG"
runtime "Debug"
symbols "on"
filter "configurations:Release"
defines "HZ_RELEASE"
runtime "Release"
optimize "on"
filter "configurations:Dist"
defines "HZ_DIST"
runtime "Release"
optimize "on"
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化