1
0
Fork 0
mirror of https://github.com/gwm17/Specter.git synced 2024-11-26 20:28:49 -05:00
Specter/premake5.lua

193 lines
3.6 KiB
Lua
Raw Normal View History

workspace "Navigator"
architecture "x64"
configurations {
"Debug",
"Release"
}
startproject "NavProject"
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
-- External directories to be included
IncludeDirs ={}
IncludeDirs["glfw"] = "Navigator/vendor/glfw/include"
IncludeDirs["ImGui"] = "Navigator/vendor/imgui"
IncludeDirs["glad"] = "Navigator/vendor/glad/include"
IncludeDirs["ImPlot"] = "Navigator/vendor/implot"
IncludeDirs["glm"] = "Navigator/vendor/glm"
IncludeDirs["asio"] = "Navigator/vendor/asio/asio/include"
include "Navigator/vendor/glfw"
include "Navigator/vendor/imgui"
include "Navigator/vendor/glad"
project "Navigator"
location "Navigator"
kind "SharedLib"
language "C++"
cppdialect "C++17"
targetdir ("lib/" .. outputdir .. "/%{prj.name}")
objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
filter "system:windows"
defines "NAV_WINDOWS"
2021-12-19 15:11:24 -05:00
pchheader "navpch.h"
pchsource "Navigator/src/navpch.cpp"
forceincludes {"navpch.h"}
filter "system:linux or macosx"
2021-12-19 15:11:24 -05:00
pchheader "%{prj.name}/src/navpch.h"
2021-12-31 14:48:18 -05:00
filter "system:macosx"
pchheader "src/navpch.h"
sysincludedirs {
"%{prj.name}/vendor/spdlog/include/",
"%{IncludeDirs.glfw}",
"%{IncludeDirs.ImGui}",
"%{IncludeDirs.glad}",
"%{IncludeDirs.ImPlot}",
"%{IncludeDirs.glm}",
"%{IncludeDirs.asio}"
2021-12-31 14:48:18 -05:00
}
filter {}
includedirs {
"%{prj.name}/src/",
"%{prj.name}/vendor/spdlog/include/",
"%{IncludeDirs.glfw}",
"%{IncludeDirs.ImGui}",
"%{IncludeDirs.glad}",
"%{IncludeDirs.ImPlot}",
"%{IncludeDirs.glm}",
"%{IncludeDirs.asio}"
}
files {
"%{prj.name}/src/**.h",
"%{prj.name}/vendor/implot/*.h",
"%{prj.name}/src/**.cpp",
"%{prj.name}/vendor/implot/*.cpp"
}
defines {
"_CRT_SECURE_NO_WARNINGS"
}
links {
"GLFW",
"GLAD",
"ImGui"
}
systemversion "latest"
defines {
"GLFW_INCLUDE_NONE"
}
filter "system:linux"
defines "NAV_LINUX"
links {
"GL",
"X11",
"dl"
}
linkoptions {
"-pthread"
}
filter "system:macosx"
defines "NAV_APPLE"
links {
2021-12-31 14:48:18 -05:00
"Cocoa.framework",
"CoreVideo.framework",
"IOKit.framework",
"OpenGL.framework",
"Carbon.framework",
"dl",
}
linkoptions{
2021-12-31 14:48:18 -05:00
"-pthread",
"-undefined dynamic_lookup"
}
filter "system:windows"
defines "NAV_EXPORT"
postbuildcommands {
("{COPY} %{cfg.buildtarget.relpath} \"../bin/" .. outputdir .. "/NavProject/\"")
}
links {
"opengl32.lib"
}
filter "configurations:Debug"
defines "NAV_DEBUG"
runtime "Debug"
symbols "on"
filter "configurations:Release"
defines "NAV_RELEASE"
runtime "Release"
optimize "on"
project "NavProject"
location "NavProject"
kind "ConsoleApp"
language "C++"
cppdialect "C++17"
staticruntime "on"
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
files {
"NavProject/main.cpp"
}
includedirs {
"Navigator/src",
2021-12-19 15:11:24 -05:00
"Navigator/src/Navigator",
"Navigator/vendor/spdlog/include/",
"Navigator/vendor/implot/",
"Navigator/vendor",
"%{IncludeDirs.glm}",
"%{IncludeDirs.asio}"
}
links {
"Navigator"
}
systemversion "latest"
2021-12-31 14:48:18 -05:00
filter "system:macosx"
defines "NAV_APPLE"
2021-12-31 14:48:18 -05:00
sysincludedirs {
"Navigator/vendor/spdlog/include/",
"%{IncludeDirs.glfw}",
"%{IncludeDirs.ImGui}",
"%{IncludeDirs.glad}",
"%{IncludeDirs.ImPlot}",
"%{IncludeDirs.glm}"
2021-12-31 14:48:18 -05:00
}
filter "system:windows"
defines "NAV_WINDOWS"
filter "system:linux"
defines "NAV_LINUX"
2021-12-31 14:48:18 -05:00
filter "configurations:Debug"
defines "NAV_DEBUG"
runtime "Debug"
symbols "on"
filter "configurations:Release"
defines "NAV_RELEASE"
runtime "Release"
optimize "on"
filter "configurations:Dist"
defines "NAV_DIST"
runtime "Release"
2021-12-31 14:48:18 -05:00
optimize "on"