auto-detect USE_MOMO
This commit is contained in:
parent
ebb9af94fa
commit
6d98e61d1f
|
@ -96,10 +96,13 @@ endif()
|
|||
# until ready
|
||||
set(WITH_LOCALE_DEFAULT ON)
|
||||
|
||||
if (APPLE OR MSVC OR ANDROID)
|
||||
set(USE_MOMO_DEFAULT ON)
|
||||
else()
|
||||
try_compile(HAVE_SETLOCALE ${CMAKE_BINARY_DIR}/check SOURCES ${CMAKE_SOURCE_DIR}/src/check/check_setlocale.c)
|
||||
include(FindIntl)
|
||||
|
||||
if (HAVE_SETLOCALE AND Intl_FOUND)
|
||||
set(USE_MOMO_DEFAULT OFF)
|
||||
else()
|
||||
set(USE_MOMO_DEFAULT ON)
|
||||
endif()
|
||||
|
||||
option(BUILD_GUI "Build the tracker (disable to build only a headless player)" ${BUILD_GUI_DEFAULT})
|
||||
|
@ -1041,7 +1044,6 @@ if (NOT WIN32)
|
|||
endif()
|
||||
|
||||
if (WITH_LOCALE)
|
||||
try_compile(HAVE_SETLOCALE ${CMAKE_BINARY_DIR}/check SOURCES ${CMAKE_SOURCE_DIR}/src/check/check_setlocale.c)
|
||||
if (HAVE_SETLOCALE)
|
||||
list(APPEND DEPENDENCIES_DEFINES HAVE_SETLOCALE)
|
||||
message(STATUS "setlocale() found")
|
||||
|
@ -1062,7 +1064,6 @@ if (WITH_LOCALE)
|
|||
if ("${CMAKE_VERSION}" VERSION_LESS "3.2")
|
||||
message(FATAL_ERROR "CMake 3.2 or later required for locale support.")
|
||||
else()
|
||||
include(FindIntl)
|
||||
if (NOT Intl_FOUND)
|
||||
message(FATAL_ERROR "Could not find libintl! Try enabling USE_MOMO.")
|
||||
endif()
|
||||
|
|
Loading…
Reference in a new issue