2024-05-10 20:04:24 +12:00
|
|
|
local includes = { "include", "include/gearlib" }
|
|
|
|
|
2024-05-08 17:27:06 +12:00
|
|
|
workspace "gearlib"
|
|
|
|
configurations { "Debug", "Release" }
|
2024-05-08 17:30:51 +12:00
|
|
|
location "build"
|
2024-05-08 17:27:06 +12:00
|
|
|
|
2024-05-10 14:06:57 +12:00
|
|
|
project "glfw"
|
|
|
|
kind "StaticLib"
|
|
|
|
language "C"
|
|
|
|
targetdir "bin/%{cfg.buildcfg}/glfw"
|
|
|
|
|
2024-05-10 20:04:24 +12:00
|
|
|
files { "include/gearlib/GLFW/**.h", "vendor/glfw/src/**.c" }
|
|
|
|
includedirs(includes)
|
2024-05-10 14:06:57 +12:00
|
|
|
|
|
|
|
filter "configurations:Debug"
|
|
|
|
defines { "DEBUG" }
|
|
|
|
symbols "On"
|
|
|
|
|
|
|
|
filter "configurations:Release"
|
|
|
|
defines { "NDEBUG" }
|
|
|
|
optimize "On"
|
|
|
|
|
|
|
|
filter "system:linux"
|
|
|
|
defines { "_GLFW_X11" }
|
|
|
|
|
|
|
|
filter "system:windows"
|
|
|
|
defines { "_GLFW_WIN32" }
|
|
|
|
|
2024-05-08 17:27:06 +12:00
|
|
|
project "gearlib"
|
|
|
|
kind "StaticLib"
|
|
|
|
language "C"
|
|
|
|
targetdir "bin/%{cfg.buildcfg}/gearlib"
|
|
|
|
|
|
|
|
files { "include/**.h", "src/**.c" }
|
2024-05-10 20:04:24 +12:00
|
|
|
includedirs(includes)
|
|
|
|
links { "glfw", "m" }
|
2024-05-08 17:27:06 +12:00
|
|
|
|
|
|
|
filter "configurations:Debug"
|
|
|
|
defines { "DEBUG" }
|
|
|
|
symbols "On"
|
|
|
|
|
|
|
|
filter "configurations:Release"
|
|
|
|
defines { "NDEBUG" }
|
|
|
|
optimize "On"
|
|
|
|
|
|
|
|
project "test"
|
|
|
|
kind "ConsoleApp"
|
|
|
|
language "C"
|
|
|
|
targetdir "bin/%{cfg.buildcfg}/test"
|
|
|
|
|
|
|
|
files { "examples/test.c" }
|
2024-05-10 20:04:24 +12:00
|
|
|
includedirs(includes)
|
2024-05-08 17:27:06 +12:00
|
|
|
links { "glfw", "gearlib", "m" }
|
|
|
|
|
|
|
|
debugdir "examples"
|
|
|
|
|
|
|
|
filter "configurations:Debug"
|
|
|
|
defines { "DEBUG" }
|
|
|
|
symbols "On"
|
|
|
|
|
|
|
|
filter "configurations:Release"
|
|
|
|
defines { "NDEBUG" }
|
|
|
|
optimize "On"
|