this repo has no description
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge pull request #205 from albertvaka/albertvaka/emscripten-build-fix

Fix build on emscripten

authored by

Jonathan Dearborn and committed by
GitHub
47a3e2b2 f15d33cc

+6 -3
+6 -3
CMakeLists.txt
··· 94 94 set(DEFAULT_BUILD_DEMOS OFF) 95 95 set(DEFAULT_DISABLE_OPENGL ON) 96 96 set(DEFAULT_DISABLE_GLES OFF) 97 + set(DEFAULT_DISABLE_GLES_1 ON) 97 98 set(DEFAULT_BUILD_SHARED OFF) 98 99 else() 99 100 message(" Using generic defaults.") ··· 159 160 endif () 160 161 161 162 # Find the package for SDL or SDL2 162 - if ( USE_SDL1 ) 163 + if ( EMSCRIPTEN ) 164 + add_definitions ("-s USE_SDL=2") 165 + elseif ( USE_SDL1 ) 163 166 find_package(SDL REQUIRED) 164 167 165 168 if ( NOT SDL_FOUND ) ··· 168 171 169 172 include_directories(${SDL_INCLUDE_DIR}) 170 173 link_libraries(${SDL_LIBRARY}) 171 - else ( USE_SDL1 ) 174 + else ( ) 172 175 find_package(SDL2 REQUIRED) 173 176 174 177 if ( NOT SDL2_FOUND ) ··· 182 185 183 186 include_directories(${SDL2_INCLUDE_DIR}) 184 187 link_libraries(${SDL2MAIN_LIBRARY} ${SDL2_LIBRARY}) 185 - endif( USE_SDL1 ) 188 + endif () 186 189 187 190 # Find the package for OpenGL 188 191 if (DISABLE_OPENGL)