2022-06-19 17:20:41 -04:00
|
|
|
workspace "Specter"
|
2021-12-18 19:23:14 -05:00
|
|
|
architecture "x64"
|
|
|
|
configurations {
|
|
|
|
"Debug",
|
|
|
|
"Release"
|
|
|
|
}
|
2022-06-19 17:20:41 -04:00
|
|
|
startproject "SpecProject"
|
2021-12-18 19:23:14 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
outputdir = "%{cfg.buildcfg}-%{cfg.system}-%{cfg.architecture}"
|
|
|
|
-- External directories to be included
|
|
|
|
IncludeDirs ={}
|
2022-06-19 17:20:41 -04:00
|
|
|
IncludeDirs["glfw"] = "Specter/vendor/glfw/include"
|
|
|
|
IncludeDirs["ImGui"] = "Specter/vendor/imgui"
|
|
|
|
IncludeDirs["glad"] = "Specter/vendor/glad/include"
|
|
|
|
IncludeDirs["ImPlot"] = "Specter/vendor/implot"
|
|
|
|
IncludeDirs["glm"] = "Specter/vendor/glm"
|
|
|
|
IncludeDirs["asio"] = "Specter/vendor/asio/asio/include"
|
|
|
|
IncludeDirs["IconFonts"] = "Specter/vendor/IconFontCppHeaders"
|
|
|
|
|
|
|
|
include "Specter/vendor/glfw"
|
|
|
|
include "Specter/vendor/imgui"
|
|
|
|
include "Specter/vendor/glad"
|
|
|
|
project "Specter"
|
|
|
|
location "Specter"
|
2022-03-08 22:44:13 -05:00
|
|
|
kind "StaticLib"
|
2021-12-18 19:23:14 -05:00
|
|
|
language "C++"
|
|
|
|
cppdialect "C++17"
|
|
|
|
targetdir ("lib/" .. outputdir .. "/%{prj.name}")
|
|
|
|
objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
|
2021-12-19 12:58:03 -05:00
|
|
|
|
|
|
|
filter "system:windows"
|
2022-06-19 17:20:41 -04:00
|
|
|
defines "SPEC_WINDOWS"
|
|
|
|
pchheader "specpch.h"
|
|
|
|
pchsource "Specter/src/specpch.cpp"
|
|
|
|
forceincludes {"specpch.h"}
|
2021-12-20 12:08:25 -05:00
|
|
|
|
2021-12-19 12:58:03 -05:00
|
|
|
filter "system:linux or macosx"
|
2022-06-19 17:20:41 -04:00
|
|
|
pchheader "%{prj.name}/src/specpch.h"
|
2021-12-31 14:48:18 -05:00
|
|
|
filter "system:macosx"
|
|
|
|
sysincludedirs {
|
|
|
|
"%{prj.name}/vendor/spdlog/include/",
|
|
|
|
"%{IncludeDirs.glfw}",
|
|
|
|
"%{IncludeDirs.ImGui}",
|
|
|
|
"%{IncludeDirs.glad}",
|
2022-01-22 15:45:37 -05:00
|
|
|
"%{IncludeDirs.ImPlot}",
|
2022-01-23 13:48:14 -05:00
|
|
|
"%{IncludeDirs.glm}",
|
2022-01-29 20:15:13 -05:00
|
|
|
"%{IncludeDirs.asio}",
|
|
|
|
"%{IncludeDirs.IconFonts}"
|
2021-12-31 14:48:18 -05:00
|
|
|
}
|
|
|
|
filter {}
|
2021-12-20 12:08:25 -05:00
|
|
|
|
|
|
|
includedirs {
|
|
|
|
"%{prj.name}/src/",
|
|
|
|
"%{prj.name}/vendor/spdlog/include/",
|
|
|
|
"%{IncludeDirs.glfw}",
|
|
|
|
"%{IncludeDirs.ImGui}",
|
2021-12-20 15:23:17 -05:00
|
|
|
"%{IncludeDirs.glad}",
|
2022-01-22 15:45:37 -05:00
|
|
|
"%{IncludeDirs.ImPlot}",
|
2022-01-23 13:48:14 -05:00
|
|
|
"%{IncludeDirs.glm}",
|
2022-01-29 20:15:13 -05:00
|
|
|
"%{IncludeDirs.asio}",
|
|
|
|
"%{IncludeDirs.IconFonts}"
|
2021-12-20 12:08:25 -05:00
|
|
|
}
|
|
|
|
|
2021-12-18 19:23:14 -05:00
|
|
|
|
|
|
|
files {
|
2021-12-18 20:00:32 -05:00
|
|
|
"%{prj.name}/src/**.h",
|
2022-02-22 21:08:57 -05:00
|
|
|
"%{prj.name}/vendor/implot/**.h",
|
2021-12-20 15:23:17 -05:00
|
|
|
"%{prj.name}/src/**.cpp",
|
2022-02-22 21:08:57 -05:00
|
|
|
"%{prj.name}/vendor/implot/**.cpp"
|
2021-12-18 19:23:14 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
defines {
|
|
|
|
"_CRT_SECURE_NO_WARNINGS"
|
|
|
|
}
|
|
|
|
|
|
|
|
links {
|
|
|
|
"GLFW",
|
2021-12-20 12:08:25 -05:00
|
|
|
"GLAD",
|
|
|
|
"ImGui"
|
2021-12-18 19:23:14 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
systemversion "latest"
|
|
|
|
defines {
|
2022-02-22 21:08:57 -05:00
|
|
|
"GLFW_INCLUDE_NONE",
|
2022-03-29 17:19:23 -04:00
|
|
|
"IMGUI_IMPL_OPENGL_LOADER_GLAD",
|
2022-02-22 21:08:57 -05:00
|
|
|
"IMPLOT_BACKEND_ENABLE_OPENGL3"
|
2021-12-18 19:23:14 -05:00
|
|
|
}
|
|
|
|
|
2021-12-20 12:08:25 -05:00
|
|
|
|
|
|
|
filter "system:linux"
|
2022-06-19 17:20:41 -04:00
|
|
|
defines "SPEC_LINUX"
|
2021-12-20 12:08:25 -05:00
|
|
|
links {
|
|
|
|
"GL",
|
|
|
|
"X11",
|
2021-12-21 17:14:24 -05:00
|
|
|
"dl"
|
|
|
|
}
|
|
|
|
linkoptions {
|
|
|
|
"-pthread"
|
2021-12-20 12:08:25 -05:00
|
|
|
}
|
|
|
|
filter "system:macosx"
|
2022-06-19 17:20:41 -04:00
|
|
|
defines "SPEC_APPLE"
|
2021-12-20 12:08:25 -05:00
|
|
|
links {
|
2021-12-31 14:48:18 -05:00
|
|
|
"Cocoa.framework",
|
|
|
|
"CoreVideo.framework",
|
|
|
|
"IOKit.framework",
|
|
|
|
"OpenGL.framework",
|
|
|
|
"Carbon.framework",
|
2022-03-08 22:44:13 -05:00
|
|
|
"dl"
|
2021-12-21 17:14:24 -05:00
|
|
|
}
|
|
|
|
linkoptions{
|
2021-12-31 14:48:18 -05:00
|
|
|
"-pthread",
|
|
|
|
"-undefined dynamic_lookup"
|
2021-12-20 12:08:25 -05:00
|
|
|
}
|
2022-01-08 22:36:16 -05:00
|
|
|
filter "system:windows"
|
|
|
|
links {
|
|
|
|
"opengl32.lib"
|
|
|
|
}
|
2021-12-20 12:08:25 -05:00
|
|
|
|
2021-12-18 19:23:14 -05:00
|
|
|
filter "configurations:Debug"
|
2022-06-19 17:20:41 -04:00
|
|
|
defines "SPEC_DEBUG"
|
2021-12-18 19:23:14 -05:00
|
|
|
runtime "Debug"
|
|
|
|
symbols "on"
|
|
|
|
|
|
|
|
filter "configurations:Release"
|
2022-06-19 17:20:41 -04:00
|
|
|
defines "SPEC_RELEASE"
|
2021-12-18 19:23:14 -05:00
|
|
|
runtime "Release"
|
|
|
|
optimize "on"
|
|
|
|
|
2022-06-19 17:20:41 -04:00
|
|
|
project "SpecProject"
|
|
|
|
location "SpecProject"
|
2021-12-18 19:23:14 -05:00
|
|
|
kind "ConsoleApp"
|
|
|
|
language "C++"
|
|
|
|
cppdialect "C++17"
|
|
|
|
targetdir ("bin/" .. outputdir .. "/%{prj.name}")
|
|
|
|
objdir ("bin-int/" .. outputdir .. "/%{prj.name}")
|
|
|
|
|
|
|
|
files {
|
2022-06-19 17:20:41 -04:00
|
|
|
"SpecProject/src/*.h",
|
|
|
|
"SpecProject/src/*.cpp"
|
2021-12-18 19:23:14 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
includedirs {
|
2022-06-19 17:20:41 -04:00
|
|
|
"Specter/src",
|
|
|
|
"Specter/src/Specter",
|
|
|
|
"Specter/vendor/spdlog/include/",
|
2022-01-29 20:15:13 -05:00
|
|
|
"%{IncludeDirs.ImPlot}",
|
|
|
|
"%{IncludeDirs.ImGui}",
|
|
|
|
"%{IncludeDirs.glad}",
|
|
|
|
"%{IncludeDirs.glfw}",
|
2022-01-23 13:48:14 -05:00
|
|
|
"%{IncludeDirs.glm}",
|
2022-01-29 20:15:13 -05:00
|
|
|
"%{IncludeDirs.asio}",
|
|
|
|
"%{IncludeDirs.IconFonts}"
|
2021-12-18 19:23:14 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
links {
|
2022-06-19 17:20:41 -04:00
|
|
|
"Specter"
|
2021-12-18 19:23:14 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
systemversion "latest"
|
|
|
|
|
2021-12-31 14:48:18 -05:00
|
|
|
filter "system:macosx"
|
2022-06-19 17:20:41 -04:00
|
|
|
defines "SPEC_APPLE"
|
2021-12-31 14:48:18 -05:00
|
|
|
sysincludedirs {
|
2022-06-19 17:20:41 -04:00
|
|
|
"Specter/vendor/spdlog/include/",
|
2021-12-31 14:48:18 -05:00
|
|
|
"%{IncludeDirs.glfw}",
|
|
|
|
"%{IncludeDirs.ImGui}",
|
|
|
|
"%{IncludeDirs.glad}",
|
2022-01-22 15:45:37 -05:00
|
|
|
"%{IncludeDirs.ImPlot}",
|
2022-01-29 20:15:13 -05:00
|
|
|
"%{IncludeDirs.glm}",
|
|
|
|
"%{IncludeDirs.asio}",
|
|
|
|
"%{IncludeDirs.IconFonts}"
|
2021-12-31 14:48:18 -05:00
|
|
|
}
|
2022-03-08 22:44:13 -05:00
|
|
|
links {
|
|
|
|
"Cocoa.framework",
|
|
|
|
"CoreVideo.framework",
|
|
|
|
"IOKit.framework",
|
|
|
|
"OpenGL.framework",
|
|
|
|
"Carbon.framework",
|
|
|
|
"GLFW",
|
|
|
|
"GLAD",
|
|
|
|
"ImGui",
|
|
|
|
"dl"
|
|
|
|
}
|
|
|
|
linkoptions {
|
|
|
|
"-pthread"
|
|
|
|
}
|
2022-03-31 15:23:45 -04:00
|
|
|
postbuildcommands {
|
|
|
|
(" {COPYDIR} Assets %{cfg.targetdir} ")
|
|
|
|
}
|
2022-01-08 22:36:16 -05:00
|
|
|
filter "system:windows"
|
2022-06-19 17:20:41 -04:00
|
|
|
defines "SPEC_WINDOWS"
|
2022-03-31 15:23:45 -04:00
|
|
|
postbuildcommands {
|
|
|
|
(" {COPYDIR} Assets %{cfg.targetdir}/Assets ")
|
|
|
|
}
|
2022-01-08 22:36:16 -05:00
|
|
|
filter "system:linux"
|
2022-06-19 17:20:41 -04:00
|
|
|
defines "SPEC_LINUX"
|
2022-03-08 22:44:13 -05:00
|
|
|
links {
|
|
|
|
"GL",
|
|
|
|
"X11",
|
|
|
|
"GLFW",
|
|
|
|
"GLAD",
|
|
|
|
"ImGui",
|
|
|
|
"dl"
|
|
|
|
}
|
2022-03-29 17:19:23 -04:00
|
|
|
linkoptions {
|
|
|
|
"-pthread"
|
|
|
|
}
|
2022-03-31 15:23:45 -04:00
|
|
|
postbuildcommands {
|
|
|
|
(" {COPYDIR} Assets %{cfg.targetdir} ")
|
|
|
|
}
|
2021-12-31 14:48:18 -05:00
|
|
|
|
2021-12-20 12:08:25 -05:00
|
|
|
|
|
|
|
|
2021-12-18 19:23:14 -05:00
|
|
|
filter "configurations:Debug"
|
2022-06-19 17:20:41 -04:00
|
|
|
defines "SPEC_DEBUG"
|
2021-12-18 19:23:14 -05:00
|
|
|
runtime "Debug"
|
|
|
|
symbols "on"
|
|
|
|
|
|
|
|
filter "configurations:Release"
|
2022-06-19 17:20:41 -04:00
|
|
|
defines "SPEC_RELEASE"
|
2021-12-18 19:23:14 -05:00
|
|
|
runtime "Release"
|
|
|
|
optimize "on"
|
|
|
|
|
|
|
|
filter "configurations:Dist"
|
2022-06-19 17:20:41 -04:00
|
|
|
defines "SPEC_DIST"
|
2021-12-18 19:23:14 -05:00
|
|
|
runtime "Release"
|
2021-12-31 14:48:18 -05:00
|
|
|
optimize "on"
|