Cleanup: set WITH_INPUT_IME=OFF when unsupported

This avoids having to do platform checks before checking WITH_INPUT_IME.
This commit is contained in:
Campbell Barton
2023-10-18 22:04:25 +11:00
parent 2a5c499585
commit 3e26a1a39c
4 changed files with 9 additions and 13 deletions

View File

@@ -513,6 +513,8 @@ endif()
# Misc
if(WIN32 OR APPLE)
option(WITH_INPUT_IME "Enable Input Method Editor (IME) for complex Asian character input" ON)
else()
set(WITH_INPUT_IME OFF)
endif()
option(WITH_INPUT_NDOF "Enable NDOF input devices (SpaceNavigator and friends)" ON)
if(UNIX AND NOT APPLE)
@@ -1138,7 +1140,7 @@ if(UNIX AND NOT (APPLE OR HAIKU))
endif()
set_and_warn_incompatible(WITH_HEADLESS WITH_GHOST_SDL OFF)
if(WIN32 OR APPLE)
if(WITH_INPUT_IME)
set_and_warn_incompatible(WITH_HEADLESS WITH_INPUT_IME OFF)
set_and_warn_incompatible(WITH_GHOST_SDL WITH_INPUT_IME OFF)
endif()

View File

@@ -42,10 +42,8 @@ if(WITH_PYTHON)
)
endif()
if(WIN32 OR APPLE)
if(WITH_INPUT_IME)
add_definitions(-DWITH_INPUT_IME)
endif()
if(WITH_INPUT_IME)
add_definitions(-DWITH_INPUT_IME)
endif()
blender_add_lib(bf_blentranslation "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")

View File

@@ -117,10 +117,8 @@ if(WITH_PYTHON)
add_definitions(-DWITH_PYTHON)
endif()
if(WIN32 OR APPLE)
if(WITH_INPUT_IME)
add_definitions(-DWITH_INPUT_IME)
endif()
if(WITH_INPUT_IME)
add_definitions(-DWITH_INPUT_IME)
endif()
if(WITH_EXPERIMENTAL_FEATURES)

View File

@@ -175,10 +175,8 @@ if(WITH_INPUT_NDOF)
add_definitions(-DWITH_INPUT_NDOF)
endif()
if(WIN32 OR APPLE)
if(WITH_INPUT_IME)
add_definitions(-DWITH_INPUT_IME)
endif()
if(WITH_INPUT_IME)
add_definitions(-DWITH_INPUT_IME)
endif()
if(WITH_COMPOSITOR_CPU)