|
@@ -29,6 +29,9 @@ target("glfw")
|
|
|
"libs/raylib/src/external/glfw/include"
|
|
|
)
|
|
|
|
|
|
+ -- Set the compiler standard to c99 (not c++)
|
|
|
+ --set_languages("c89")
|
|
|
+
|
|
|
-- add_files("libs/raylib/src/external/glfw/deps/*.c")
|
|
|
add_files(
|
|
|
--"libs/raylib/src/external/glfw/include/GLFW/glfw3.h",
|
|
@@ -50,20 +53,9 @@ target("glfw")
|
|
|
|
|
|
)
|
|
|
|
|
|
+ --set_languages("c")
|
|
|
|
|
|
|
|
|
-
|
|
|
- -- Set the compiler standard to c99 (not c++)
|
|
|
- set_languages("c99")
|
|
|
-
|
|
|
- -- Check for MSVC toolchain
|
|
|
- if is_plat("windows") then
|
|
|
- add_cflags("/W0") -- Add warning level 3 for MSVC
|
|
|
- add_cflags("/TC") -- Compile all .c files as C files
|
|
|
- --add_cflags("/wd4244") -- Disable warning 4244
|
|
|
- end
|
|
|
-
|
|
|
-
|
|
|
-- Test include everything but os defined for target
|
|
|
-- OS Conditional Logic
|
|
|
|
|
@@ -92,6 +84,15 @@ target("glfw")
|
|
|
"libs/raylib/src/external/glfw/src/egl_context.c",
|
|
|
"libs/raylib/src/external/glfw/src/osmesa_context.c"
|
|
|
)
|
|
|
+
|
|
|
+ -- Check for MSVC toolchain
|
|
|
+ if is_plat("windows") then
|
|
|
+ add_cflags("/W0") -- Add warning level 3 for MSVC
|
|
|
+ add_cflags("/TC") -- Compile all .c files as C files
|
|
|
+ --add_cflags("/wd4244") -- Disable warning 4244
|
|
|
+ end
|
|
|
+
|
|
|
+ -- set_languages("c")
|
|
|
add_syslinks("user32", "shell32", "gdi32")
|
|
|
elseif is_plat("macosx") then
|
|
|
add_defines("_GLFW_COCOA")
|
|
@@ -183,10 +184,20 @@ target("raylib-nuklear")
|
|
|
|
|
|
target_end()
|
|
|
|
|
|
+-- Define a game library target (dll or static library)
|
|
|
+-- TODO: Make the core game as a library, which can be reloaded at runtime for hot-reloading
|
|
|
+-- This will mean that the game can be reloaded without restarting the application
|
|
|
+-- To do this, we will need the GameState to be stored in a Heap-allocated object
|
|
|
+
|
|
|
-- Add the target executable
|
|
|
target("bgstart")
|
|
|
set_kind("binary") -- Specify the kind of target (binary/executable)
|
|
|
set_default(true) -- Set this target as the default build target
|
|
|
+
|
|
|
+ -- Allow assets to be in the project directory /assets, instead of copying them into the build directory
|
|
|
+ set_rundir("$(projectdir)") -- Set the run directory to the project directory
|
|
|
+
|
|
|
+ add_defines("PLATFORM_DESKTOP") -- Define the PLATFORM_DESKTOP macro
|
|
|
|
|
|
|
|
|
-- Include directories for your header files
|