File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11-- premake5.lua
22
3- -- you can redefine dependencies
4- SDL2_DIR = os.getenv (" SDL2_DIR" ) or " ../dependencies/SDL2"
5-
63project " DriverLevelTool"
74 kind " ConsoleApp"
85 language " C++"
96 targetdir " bin/%{cfg.buildcfg}"
107
11- uses { " libnstd " , " glad " , " ImGui " , " frameworkLib" }
8+ uses { " ImGui " , " libnstd " , " frameworkLib" }
129
1310 includedirs {
1411 " ./" ,
15- " ../dependencies/libnstd/include" ,
16- " ../dependencies/imgui" ,
17- " ../dependencies"
1812 }
1913
2014 files {
@@ -29,30 +23,12 @@ project "DriverLevelTool"
2923 buildoptions {
3024 " -Wno-narrowing" ,
3125 " -fpermissive" ,
32- }
33- includedirs {
34- " /usr/include/SDL2"
3526 }
3627 links {
37- " GL" ,
38- " SDL2" ,
3928 " dl"
4029 }
4130
4231 cppdialect " C++11"
43-
44- filter " system:windows"
45- includedirs {
46- SDL2_DIR .. " /include"
47- }
48- links {
49- " SDL2" ,
50- " ImGui"
51- }
52- libdirs {
53- SDL2_DIR .. " /lib/x86" ,
54- }
55-
5632
5733 filter " configurations:Debug"
5834 targetsuffix " _dbg"
Original file line number Diff line number Diff line change @@ -93,21 +93,26 @@ project "glad"
9393
9494usage " glad"
9595 includedirs {
96- " dependencies/glad/*.h " ,
96+ " dependencies" ,
9797 }
98+
99+ filter " system:linux"
100+ links {
101+ " GL" ,
102+ }
98103
99104-- ImGui
100105project " ImGui"
101106 kind " StaticLib"
102107 targetdir " bin/%{cfg.buildcfg}"
108+
109+ uses {" SDL2" , " glad" }
103110
104111 filter " system:Windows"
105112 defines { " _CRT_SECURE_NO_WARNINGS" , " IMGUI_IMPL_OPENGL_LOADER_GLAD" }
106113
107114 includedirs {
108115 " dependencies/imgui" ,
109- " dependencies" ,
110- SDL2_DIR .. " /include"
111116 }
112117
113118 files {
@@ -124,6 +129,25 @@ usage "ImGui"
124129 " dependencies/imgui" ,
125130 }
126131 links { " ImGui" }
132+
133+ -- SDL2 as a usage
134+ usage " SDL2"
135+ links {
136+ " SDL2" ,
137+ }
138+
139+ filter " system:linux"
140+ includedirs {
141+ " /usr/include/SDL2"
142+ }
143+
144+ filter " system:windows"
145+ includedirs {
146+ SDL2_DIR .. " /include"
147+ }
148+ libdirs {
149+ SDL2_DIR .. " /lib/x86" ,
150+ }
127151
128152include " DriverLevelTool/premake5.lua"
129153include " DriverSoundTool/premake5.lua"
You can’t perform that action at this time.
0 commit comments