SDL_helloworld: On Emscripten, create a html website instead of a js library

From e0efd3c2a73f2159e69842775a5917e1b7318459 Mon Sep 17 00:00:00 2001
From: Anonymous Maarten <[EMAIL REDACTED]>
Date: Wed, 22 May 2024 03:56:31 +0200
Subject: [PATCH] On Emscripten, create a html website instead of a js library

---
 CMakeLists.txt | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7332651..804fd2b 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -31,3 +31,8 @@ target_link_libraries(sdl-helloworld PRIVATE SDL3::SDL3)
 # This is safe to set on all platforms. Otherwise your SDL app will
 #  have a terminal window pop up with it on Windows.
 set_property(TARGET sdl-helloworld PROPERTY WIN32_EXECUTABLE TRUE)
+
+if(EMSCRIPTEN)
+    # Create a html webpage
+    set_property(TARGET sdl-helloworld PROPERTY SUFFIX ".html")
+endif()