Skip to content

Commit 6c244ad

Browse files
committed
Fixed last compilation issues
1 parent 6cb0bed commit 6c244ad

File tree

2 files changed

+44
-14
lines changed

2 files changed

+44
-14
lines changed

Sources/Overload/OvGame/premake5.lua

Lines changed: 37 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ project "OvGame"
1111
"**.cpp",
1212
"**.lua",
1313
"**.ini",
14-
"**.rc"
1514
}
1615

1716
includedirs {
@@ -36,10 +35,6 @@ project "OvGame"
3635
}
3736

3837
links {
39-
-- Precompiled Libraries
40-
"dbghelp.lib",
41-
"opengl32.lib",
42-
4338
-- Dependencies
4439
"assimp",
4540
"bullet3",
@@ -63,12 +58,6 @@ project "OvGame"
6358
"OvWindowing"
6459
}
6560

66-
postbuildcommands {
67-
"for /f \"delims=|\" %%i in ('dir /B /S \"%{dependdir}\\*.dll\"') do xcopy /Q /Y \"%%i\" \"%{outputdir}%{cfg.buildcfg}\\%{prj.name}\"",
68-
"xcopy \"%{resdir}Engine\\*\" \"%{outputdir}%{cfg.buildcfg}\\%{prj.name}\\Data\\Engine\" /y /i /r /e /q",
69-
"EXIT /B 0"
70-
}
71-
7261
filter { "configurations:Debug" }
7362
defines { "DEBUG" }
7463
symbols "On"
@@ -83,3 +72,40 @@ project "OvGame"
8372
filter { "system:windows" }
8473
-- forces post-build commands to trigger even if nothing changed
8574
fastuptodate "Off"
75+
76+
files {
77+
"**.rc",
78+
}
79+
80+
links {
81+
-- Precompiled Libraries
82+
"dbghelp.lib",
83+
"opengl32.lib",
84+
}
85+
86+
postbuildcommands {
87+
"for /f \"delims=|\" %%i in ('dir /B /S \"%{dependdir}\\*.dll\"') do xcopy /Q /Y \"%%i\" \"%{outputdir}%{cfg.buildcfg}\\%{prj.name}\"",
88+
"xcopy \"%{resdir}Engine\\*\" \"%{outputdir}%{cfg.buildcfg}\\%{prj.name}\\Data\\Engine\" /y /i /r /e /q",
89+
"EXIT /B 0"
90+
}
91+
92+
filter { "system:linux" }
93+
linkoptions {
94+
"-Wl,--whole-archive",
95+
"-lsoloud",
96+
"-llua",
97+
"-lglfw",
98+
"-Wl,--no-whole-archive",
99+
}
100+
101+
links {
102+
"dl",
103+
"pthread",
104+
"GL",
105+
"X11",
106+
}
107+
108+
postbuildcommands {
109+
"cp -r %{resdir}Engine %{outputdir}%{cfg.buildcfg}/%{prj.name}/Data/Engine",
110+
"true"
111+
}

Sources/Overload/OvGame/src/OvGame/Main.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,13 @@ FORCE_DEDICATED_GPU
1313
#ifdef _DEBUG
1414
int main()
1515
#else
16-
#undef APIENTRY
17-
#include "Windows.h"
18-
INT WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR lpCmdLine, INT nCmdShow)
16+
#ifdef _WIN32
17+
#undef APIENTRY
18+
#include "Windows.h"
19+
INT WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR lpCmdLine, INT nCmdShow)
20+
#else
21+
int main()
22+
#endif
1923
#endif
2024
{
2125
OvGame::Core::Application app;

0 commit comments

Comments
 (0)