From 9294d278d6df59ca4e15beea0c39763a133fe404 Mon Sep 17 00:00:00 2001 From: Andrey Fidrya Date: Sat, 27 Apr 2019 20:55:23 +0300 Subject: [PATCH] fix emscripten link warnings --- CMakeLists.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index e7a6eef7c..725ab2105 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -145,7 +145,11 @@ set(OXYGINE_LIBRARY_DIRS if (FORCE_GLES) set(OPENGL_LIBRARIES libGLESv2.lib) -endif(FORCE_GLES) +elseif (EMSCRIPTEN) + # Has no OpenGL library to link against, but this string contains "nul" + # producing link warnings. + set(OPENGL_LIBRARIES "") +endif() @@ -159,8 +163,10 @@ set(CORE_LIBS if (OX_USE_SDL2) - set(CORE_LIBS ${CORE_LIBS} - SDL2main SDL2) + if (!EMSCRIPTEN) + set(CORE_LIBS ${CORE_LIBS} + SDL2main SDL2) + endif() set(OXYGINE_INCLUDE_DIRS ${OXYGINE_INCLUDE_DIRS} ${SDL2_INCLUDE_DIRS}) endif(OX_USE_SDL2)