aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authornathansmithsmith <thenathansmithsmith@gmail.com>2023-12-23 17:04:05 -0700
committernathansmithsmith <thenathansmithsmith@gmail.com>2023-12-23 17:04:05 -0700
commitf439828dc068974ddc161cc3469ac489a93bbabc (patch)
tree1d74af0b59744a17ba73716d91196922d3843859 /CMakeLists.txt
parent2c046ef3dca9e128a801c7a92c3a3a63e01fdd98 (diff)
Working on the web assembly openglES issue
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt10
1 files changed, 8 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b37f16b..c2f665e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,4 +1,3 @@
-
cmake_minimum_required(VERSION 3.11)
project(KillaFacsista VERSION 1.0)
@@ -17,8 +16,15 @@ file(GLOB SRC_FILES src/*.c src/entities/*.c src/levels/*.c src/screens/*.c)
add_executable(${PROJECT_NAME} ${SRC_FILES})
+# Link the mother fucking assets.
+if (${PLATFORM} MATCHES "Web")
+ set_target_properties(${PROJECT_NAME} PROPERTIES LINK_FLAGS "--preload-file assets.rres")
+endif()
+
+set(RAYLIB raylib)
+
target_include_directories(${PROJECT_NAME} PUBLIC include src)
-target_link_libraries(${PROJECT_NAME} raylib m glfw)
+target_link_libraries(${PROJECT_NAME} ${RAYLIB} m glfw)
file(COPY assets/assets.rres DESTINATION ${CMAKE_BINARY_DIR})