From 3e7912144edc5c69c53ed5a9515ae21d66937963 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A1zaro=20Albuquerque?= <33807434+lzralbu@users.noreply.github.com> Date: Sat, 8 Jun 2024 20:22:27 -0400 Subject: [PATCH] Update CMakeLists.txt Changes required to make possible building raylib for web on Windows 10. --- src/CMakeLists.txt | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 387665705..7fed3215e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -42,11 +42,6 @@ if (NOT ${PLATFORM} MATCHES "Web") include(GlfwImport) endif () -# Sets additional platform options and link libraries for each platform -# also selects the proper graphics API and version for that platform -# Produces a variable LIBS_PRIVATE that will be used later -include(LibraryConfigurations) - if (USE_AUDIO) MESSAGE(STATUS "Audio Backend: miniaudio") list(APPEND raylib_sources raudio.c) @@ -57,6 +52,11 @@ endif () add_library(raylib ${raylib_sources} ${raylib_public_headers}) +# Sets additional platform options and link libraries for each platform +# also selects the proper graphics API and version for that platform +# Produces a variable LIBS_PRIVATE that will be used later +include(LibraryConfigurations) + if (NOT BUILD_SHARED_LIBS) MESSAGE(STATUS "Building raylib static library") add_library(raylib_static ALIAS raylib) @@ -69,7 +69,7 @@ else() endif() if (${PLATFORM} MATCHES "Web") - target_link_options(raylib PRIVATE "-sUSE_GLFW=3") + target_link_options(raylib INTERFACE "-sUSE_GLFW=3" "-sASSERTIONS=1") endif() set_target_properties(raylib PROPERTIES