mirror of https://github.com/mgba-emu/mgba.git
Wii: Work around linker issues with CheckFunctionExists
This commit is contained in:
parent
37d65d181c
commit
a07aedc7da
|
@ -312,12 +312,19 @@ if(NOT CMAKE_SYSTEM_NAME STREQUAL "Generic")
|
|||
check_function_exists(setlocale HAVE_SETLOCALE)
|
||||
else()
|
||||
if(DEFINED 3DS OR DEFINED WII)
|
||||
set(CMAKE_REQUIRED_FLAGS -Wl,--require-defined,snprintf_l)
|
||||
check_function_exists(snprintf_l HAVE_SNPRINTF_L)
|
||||
set(CMAKE_REQUIRED_FLAGS -Wl,--require-defined,strtof_l)
|
||||
check_function_exists(strtof_l HAVE_STRTOF_L)
|
||||
set(CMAKE_REQUIRED_FLAGS -Wl,--require-defined,newlocale)
|
||||
check_function_exists(newlocale HAVE_NEWLOCALE)
|
||||
set(CMAKE_REQUIRED_FLAGS -Wl,--require-defined,freelocale)
|
||||
check_function_exists(freelocale HAVE_FREELOCALE)
|
||||
set(CMAKE_REQUIRED_FLAGS -Wl,--require-defined,uselocale)
|
||||
check_function_exists(uselocale HAVE_USELOCALE)
|
||||
set(CMAKE_REQUIRED_FLAGS -Wl,--require-defined,setlocale)
|
||||
check_function_exists(setlocale HAVE_SETLOCALE)
|
||||
unset(CMAKE_REQUIRED_FLAGS)
|
||||
endif()
|
||||
if(NOT DEFINED 3DS AND NOT DEFINED PSP2 AND NOT DEFINED WII)
|
||||
set(DISABLE_DEPS ON CACHE BOOL "This platform cannot build with dependencies" FORCE)
|
||||
|
@ -344,7 +351,7 @@ if(HAVE_LOCALTIME_R)
|
|||
list(APPEND FUNCTION_DEFINES HAVE_LOCALTIME_R)
|
||||
endif()
|
||||
|
||||
if(HAVE_NEWLOCALE AND HAVE_FREELOCALE AND HAVE_USELOCALE OR APPLE OR DEFINED 3DS)
|
||||
if(HAVE_NEWLOCALE AND HAVE_FREELOCALE AND HAVE_USELOCALE OR APPLE)
|
||||
list(APPEND FUNCTION_DEFINES HAVE_LOCALE)
|
||||
if (HAVE_STRTOF_L)
|
||||
list(APPEND FUNCTION_DEFINES HAVE_STRTOF_L)
|
||||
|
|
Loading…
Reference in New Issue