From f439828dc068974ddc161cc3469ac489a93bbabc Mon Sep 17 00:00:00 2001 From: nathansmithsmith Date: Sat, 23 Dec 2023 17:04:05 -0700 Subject: Working on the web assembly openglES issue --- CMakeLists.txt | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'CMakeLists.txt') 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}) -- cgit v1.2.3