@@ -173,7 +173,7 @@ option(UNITTEST "Set to ON to generate the unittest target" ${UNITTEST})
173
173
option (SIMULATOR "Set to ON when targeting an x86 simulator of an ARM platform" ${SIMULATOR} )
174
174
option (LIBRETRO "Set to ON to generate the libretro target" OFF )
175
175
# :: Options
176
- option (USE_LIBNX "Set to ON to build for Switch(libnx)" OFF )
176
+ option (USE_LIBNX "Set to ON to build for Switch (libnx)" OFF )
177
177
option (USE_FFMPEG "Build with FFMPEG support" ON )
178
178
option (USE_DISCORD "Build with Discord support" ON )
179
179
option (USE_MINIUPNPC "Build with miniUPnPc support" ON )
@@ -221,12 +221,21 @@ endif()
221
221
222
222
if (LIBRETRO)
223
223
add_definitions (-D__LIBRETRO__)
224
- add_definitions (-DGLEW_NO_GLU )
224
+ set (GLEW_NO_GLU ON )
225
225
if (NOT MSVC )
226
226
add_compile_options (-fPIC)
227
227
endif ()
228
228
endif ()
229
229
230
+ if (USE_LIBNX)
231
+ set (GLEW_NO_GLU ON )
232
+ add_definitions (-DLUA_32BITS)
233
+ endif ()
234
+
235
+ if (GLEW_NO_GLU)
236
+ add_definitions (-DGLEW_NO_GLU)
237
+ endif ()
238
+
230
239
if (ANDROID)
231
240
set (MOBILE_DEVICE ON )
232
241
set (USING_GLES2 ON )
@@ -1468,7 +1477,11 @@ else()
1468
1477
message (WARNING "Found SDL2_ttf <2.0.18 - this is too old, falling back to atlas" )
1469
1478
endif ()
1470
1479
if (SDL2_ttf_FOUND)
1471
- set (nativeExtraLibs ${nativeExtraLibs} SDL2_ttf::SDL2_ttf)
1480
+ if (TARGET SDL2_ttf::SDL2_ttf)
1481
+ set (nativeExtraLibs ${nativeExtraLibs} SDL2_ttf::SDL2_ttf)
1482
+ else ()
1483
+ set (nativeExtraLibs ${nativeExtraLibs} SDL2_ttf::SDL2_ttf-static )
1484
+ endif ()
1472
1485
elseif (SDL2_ttf_PKGCONFIG_FOUND)
1473
1486
set (nativeExtraLibs ${nativeExtraLibs} PkgConfig::SDL2_ttf_PKGCONFIG)
1474
1487
endif ()
0 commit comments