summaryrefslogtreecommitdiff
path: root/premake5.lua
diff options
context:
space:
mode:
Diffstat (limited to 'premake5.lua')
-rw-r--r--premake5.lua54
1 files changed, 54 insertions, 0 deletions
diff --git a/premake5.lua b/premake5.lua
new file mode 100644
index 0000000..41dbd30
--- /dev/null
+++ b/premake5.lua
@@ -0,0 +1,54 @@
+newoption {
+ trigger = "arch",
+ value = "arch",
+ description = "Set the architecture of the binary to be built.",
+ allowed = {
+ { "arm64", "Build for arm64" },
+ { "amd64", "Build for amd64" },
+ },
+ default = "amd64",
+}
+
+workspace "creative-coding"
+ configurations { "Debug", "Release" }
+
+ kind "ConsoleApp"
+
+ includedirs { "include/" }
+ links { "glfw3" }
+
+ filter "system:linux"
+ architecture "x64"
+ libdirs { "lib/linux-amd64" }
+ links { "m", "dl", "pthread" }
+
+ filter "system:windows"
+ architecture "x64"
+ libdirs { "lib/windows-amd64" }
+ defines { "_WIN32" }
+ links { "winmm", "kernel32", "opengl32", "gdi32" }
+
+ filter { "system:macosx", "options:arch=arm64" }
+ libdirs { "lib/macos-arm64" }
+ filter { "system:macosx", "options:arch=amd64" }
+ libdirs { "lib/macos-amd64" }
+ filter "system:macosx"
+ links {
+ "m", "CoreVideo.framework", "CoreAudio.framework",
+ "IOKit.framework", "Cocoa.framework", "OpenGL.framework"
+ }
+
+ filter "configurations:Debug"
+ defines { "DEBUG" }
+ symbols "On"
+
+ filter "configurations:Release"
+ defines { "NDEBUG" }
+ optimize "On"
+
+project "opengl-gravity"
+ language "C++"
+ cppdialect "C++17"
+ location "src/"
+ files { "src/**.h" , "src/**.c" , "src/**.hpp" , "src/**.cpp" }
+