summaryrefslogtreecommitdiff
path: root/premake5.lua
blob: 41dbd300c5741357b7cbb95be93d3528c96ab9af (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
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" }