summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorruki <[email protected]>2023-03-02 22:44:50 +0800
committerruki <[email protected]>2023-03-02 22:44:50 +0800
commit43d78bb9720b30b86408bed2a25feff2a9b14cd2 (patch)
tree83dc5f3cba01e726cabf750e0068e6e3bd1926ec /tests
parent38a4a383cd9df2ec732ccd78194666cd97299050 (diff)
add multiplat tests
Diffstat (limited to 'tests')
-rw-r--r--tests/projects/package/multiplat/.gitignore8
-rw-r--r--tests/projects/package/multiplat/src/main.cpp62
-rw-r--r--tests/projects/package/multiplat/xmake.lua18
3 files changed, 88 insertions, 0 deletions
diff --git a/tests/projects/package/multiplat/.gitignore b/tests/projects/package/multiplat/.gitignore
new file mode 100644
index 000000000..152105761
--- /dev/null
+++ b/tests/projects/package/multiplat/.gitignore
@@ -0,0 +1,8 @@
+# Xmake cache
+.xmake/
+build/
+
+# MacOS Cache
+.DS_Store
+
+
diff --git a/tests/projects/package/multiplat/src/main.cpp b/tests/projects/package/multiplat/src/main.cpp
new file mode 100644
index 000000000..ae4174e80
--- /dev/null
+++ b/tests/projects/package/multiplat/src/main.cpp
@@ -0,0 +1,62 @@
+/*******************************************************************************************
+*
+* raylib [core] example - Basic window
+*
+* Welcome to raylib!
+*
+* To test examples, just press F6 and execute raylib_compile_execute script
+* Note that compiled executable is placed in the same folder as .c file
+*
+* You can find all basic examples on C:\raylib\raylib\examples folder or
+* raylib official webpage: www.raylib.com
+*
+* Enjoy using raylib. :)
+*
+* This example has been created using raylib 1.0 (www.raylib.com)
+* raylib is licensed under an unmodified zlib/libpng license (View raylib.h for details)
+*
+* Copyright (c) 2013-2016 Ramon Santamaria (@raysan5)
+*
+********************************************************************************************/
+
+#include "raylib.h"
+
+int main(void)
+{
+ // Initialization
+ //--------------------------------------------------------------------------------------
+ const int screenWidth = 800;
+ const int screenHeight = 450;
+
+ InitWindow(screenWidth, screenHeight, "raylib [core] example - basic window");
+
+ SetTargetFPS(60); // Set our game to run at 60 frames-per-second
+ //--------------------------------------------------------------------------------------
+
+ // Main game loop
+ while (!WindowShouldClose()) // Detect window close button or ESC key
+ {
+ // Update
+ //----------------------------------------------------------------------------------
+ // TODO: Update your variables here
+ //----------------------------------------------------------------------------------
+
+ // Draw
+ //----------------------------------------------------------------------------------
+ BeginDrawing();
+
+ ClearBackground(RAYWHITE);
+
+ DrawText("Congrats! You created your first window!", 190, 200, 20, LIGHTGRAY);
+
+ EndDrawing();
+ //----------------------------------------------------------------------------------
+ }
+
+ // De-Initialization
+ //--------------------------------------------------------------------------------------
+ CloseWindow(); // Close window and OpenGL context
+ //--------------------------------------------------------------------------------------
+
+ return 0;
+}
diff --git a/tests/projects/package/multiplat/xmake.lua b/tests/projects/package/multiplat/xmake.lua
new file mode 100644
index 000000000..40fb2ed79
--- /dev/null
+++ b/tests/projects/package/multiplat/xmake.lua
@@ -0,0 +1,18 @@
+add_rules("mode.debug", "mode.release")
+
+add_requires("raylib")
+add_requires("raylib~mingw", {plat = "mingw", arch = "x86_64"})
+
+target("macosx")
+ add_packages("raylib")
+ set_kind("binary")
+ add_files("src/*.cpp")
+ set_languages("c++11")
+
+target("mingw")
+ set_plat("mingw")
+ set_arch("x86_64")
+ add_packages("raylib~mingw")
+ set_kind("binary")
+ add_files("src/*.cpp")
+