[Bf-blender-cvs] [e951e81b0f6] master: Cleanup: Cmake: remove unnecessary definitions for internationalization

Aaron Carlisle noreply at git.blender.org
Sat Jan 29 23:40:35 CET 2022


Commit: e951e81b0f66f5714ecee9f962dd3f995e0f338e
Author: Aaron Carlisle
Date:   Sat Jan 29 17:40:02 2022 -0500
Branches: master
https://developer.blender.org/rBe951e81b0f66f5714ecee9f962dd3f995e0f338e

Cleanup: Cmake: remove unnecessary definitions for internationalization

Previously, macros were ifdefed using the cmake option `WITH_INTERNATIONAL`
However, the is unnecessary as withen the functions themselves have checks for building without internationalization.
This also means that many `add_definitions(-DWITH_INTERNATIONAL)` are also unnecessary.

Reviewed By: mont29, LazyDodo

Differential Revision: https://developer.blender.org/D13929

===================================================================

M	intern/locale/CMakeLists.txt
M	source/blender/blenfont/CMakeLists.txt
M	source/blender/blenkernel/CMakeLists.txt
M	source/blender/blenloader/CMakeLists.txt
M	source/blender/blentranslation/BLT_translation.h
M	source/blender/bmesh/CMakeLists.txt
M	source/blender/compositor/CMakeLists.txt
M	source/blender/editors/animation/CMakeLists.txt
M	source/blender/editors/armature/CMakeLists.txt
M	source/blender/editors/curve/CMakeLists.txt
M	source/blender/editors/gpencil/CMakeLists.txt
M	source/blender/editors/interface/interface_style.c
M	source/blender/editors/io/CMakeLists.txt
M	source/blender/editors/mesh/CMakeLists.txt
M	source/blender/editors/object/CMakeLists.txt
M	source/blender/editors/physics/CMakeLists.txt
M	source/blender/editors/render/CMakeLists.txt
M	source/blender/editors/scene/CMakeLists.txt
M	source/blender/editors/screen/CMakeLists.txt
M	source/blender/editors/sculpt_paint/CMakeLists.txt
M	source/blender/editors/space_buttons/CMakeLists.txt
M	source/blender/editors/space_clip/CMakeLists.txt
M	source/blender/editors/space_file/CMakeLists.txt
M	source/blender/editors/space_graph/CMakeLists.txt
M	source/blender/editors/space_image/CMakeLists.txt
M	source/blender/editors/space_info/CMakeLists.txt
M	source/blender/editors/space_nla/CMakeLists.txt
M	source/blender/editors/space_node/CMakeLists.txt
M	source/blender/editors/space_outliner/CMakeLists.txt
M	source/blender/editors/space_sequencer/CMakeLists.txt
M	source/blender/editors/space_text/CMakeLists.txt
M	source/blender/editors/space_view3d/CMakeLists.txt
M	source/blender/editors/space_view3d/view3d_draw.c
M	source/blender/editors/transform/CMakeLists.txt
M	source/blender/editors/undo/CMakeLists.txt
M	source/blender/editors/util/CMakeLists.txt
M	source/blender/editors/uvedit/CMakeLists.txt
M	source/blender/freestyle/CMakeLists.txt
M	source/blender/gpencil_modifiers/CMakeLists.txt
M	source/blender/io/collada/CMakeLists.txt
M	source/blender/modifiers/CMakeLists.txt
M	source/blender/nodes/CMakeLists.txt
M	source/blender/nodes/composite/CMakeLists.txt
M	source/blender/nodes/function/CMakeLists.txt
M	source/blender/nodes/geometry/CMakeLists.txt
M	source/blender/nodes/shader/CMakeLists.txt
M	source/blender/nodes/texture/CMakeLists.txt
M	source/blender/render/CMakeLists.txt
M	source/blender/shader_fx/CMakeLists.txt
M	source/blender/windowmanager/CMakeLists.txt
M	source/blender/windowmanager/intern/wm_init_exit.c

===================================================================

diff --git a/intern/locale/CMakeLists.txt b/intern/locale/CMakeLists.txt
index 732fa1e4d11..3e467302d8e 100644
--- a/intern/locale/CMakeLists.txt
+++ b/intern/locale/CMakeLists.txt
@@ -56,7 +56,6 @@ if(WITH_INTERNATIONAL)
   list(APPEND LIB
     ${BOOST_LIBRARIES}
   )
-  add_definitions(-DWITH_INTERNATIONAL)
   add_definitions(${BOOST_DEFINITIONS})
 endif()
 
diff --git a/source/blender/blenfont/CMakeLists.txt b/source/blender/blenfont/CMakeLists.txt
index dd22bc2e7e0..5d04823cd0a 100644
--- a/source/blender/blenfont/CMakeLists.txt
+++ b/source/blender/blenfont/CMakeLists.txt
@@ -63,10 +63,6 @@ if(WIN32)
   )
 endif()
 
-if(WITH_INTERNATIONAL)
-  add_definitions(-DWITH_INTERNATIONAL)
-endif()
-
 if(WITH_PYTHON)
   add_definitions(-DWITH_PYTHON)
   list(APPEND INC
diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt
index 220d4673075..05902e94552 100644
--- a/source/blender/blenkernel/CMakeLists.txt
+++ b/source/blender/blenkernel/CMakeLists.txt
@@ -719,10 +719,6 @@ if(WITH_FFTW3)
   add_definitions(-DFFTW3=1)
 endif()
 
-if(WITH_INTERNATIONAL)
-  add_definitions(-DWITH_INTERNATIONAL)
-endif()
-
 if(WITH_FREESTYLE)
   add_definitions(-DWITH_FREESTYLE)
 endif()
diff --git a/source/blender/blenloader/CMakeLists.txt b/source/blender/blenloader/CMakeLists.txt
index 245514d4977..1ff713160df 100644
--- a/source/blender/blenloader/CMakeLists.txt
+++ b/source/blender/blenloader/CMakeLists.txt
@@ -86,10 +86,6 @@ if(WITH_BUILDINFO)
   add_definitions(-DWITH_BUILDINFO)
 endif()
 
-if(WITH_INTERNATIONAL)
-  add_definitions(-DWITH_INTERNATIONAL)
-endif()
-
 if(WITH_CODEC_FFMPEG)
   add_definitions(-DWITH_FFMPEG)
 endif()
diff --git a/source/blender/blentranslation/BLT_translation.h b/source/blender/blentranslation/BLT_translation.h
index 21296143226..8785eadf5f1 100644
--- a/source/blender/blentranslation/BLT_translation.h
+++ b/source/blender/blentranslation/BLT_translation.h
@@ -55,24 +55,14 @@ bool BLT_lang_is_ime_supported(void);
 #define N_(msgid) msgid
 #define CTX_N_(context, msgid) msgid
 
-/* Those macros should be used everywhere in UI code. */
-#ifdef WITH_INTERNATIONAL
+/* These macros should be used everywhere in UI code. */
 /*#  define _(msgid) BLT_gettext(msgid) */
-#  define IFACE_(msgid) BLT_translate_do_iface(NULL, msgid)
-#  define TIP_(msgid) BLT_translate_do_tooltip(NULL, msgid)
-#  define DATA_(msgid) BLT_translate_do_new_dataname(NULL, msgid)
-#  define CTX_IFACE_(context, msgid) BLT_translate_do_iface(context, msgid)
-#  define CTX_TIP_(context, msgid) BLT_translate_do_tooltip(context, msgid)
-#  define CTX_DATA_(context, msgid) BLT_translate_do_new_dataname(context, msgid)
-#else
-/*#  define _(msgid) msgid */
-#  define IFACE_(msgid) msgid
-#  define TIP_(msgid) msgid
-#  define DATA_(msgid) msgid
-#  define CTX_IFACE_(context, msgid) ((void)(0 ? (context) : 0), msgid)
-#  define CTX_TIP_(context, msgid) ((void)(0 ? (context) : 0), msgid)
-#  define CTX_DATA_(context, msgid) ((void)(0 ? (context) : 0), msgid)
-#endif
+#define IFACE_(msgid) BLT_translate_do_iface(NULL, msgid)
+#define TIP_(msgid) BLT_translate_do_tooltip(NULL, msgid)
+#define DATA_(msgid) BLT_translate_do_new_dataname(NULL, msgid)
+#define CTX_IFACE_(context, msgid) BLT_translate_do_iface(context, msgid)
+#define CTX_TIP_(context, msgid) BLT_translate_do_tooltip(context, msgid)
+#define CTX_DATA_(context, msgid) BLT_translate_do_new_dataname(context, msgid)
 
 /* Helper macro, when we want to define a same msgid for multiple msgctxt...
  * Does nothing in C, but is "parsed" by our i18n py tools.
diff --git a/source/blender/bmesh/CMakeLists.txt b/source/blender/bmesh/CMakeLists.txt
index e2ed005cf9e..a61327238fe 100644
--- a/source/blender/bmesh/CMakeLists.txt
+++ b/source/blender/bmesh/CMakeLists.txt
@@ -207,10 +207,6 @@ if(WITH_BULLET)
   add_definitions(-DWITH_BULLET)
 endif()
 
-if(WITH_INTERNATIONAL)
-  add_definitions(-DWITH_INTERNATIONAL)
-endif()
-
 if(WITH_FREESTYLE)
   add_definitions(-DWITH_FREESTYLE)
 endif()
diff --git a/source/blender/compositor/CMakeLists.txt b/source/blender/compositor/CMakeLists.txt
index b9b365a3175..025e114cb52 100644
--- a/source/blender/compositor/CMakeLists.txt
+++ b/source/blender/compositor/CMakeLists.txt
@@ -631,10 +631,6 @@ list(APPEND SRC
 unset(GENSRC)
 unset(GENSRC_DIR)
 
-if(WITH_INTERNATIONAL)
-  add_definitions(-DWITH_INTERNATIONAL)
-endif()
-
 if(WITH_OPENIMAGEDENOISE)
   add_definitions(-DWITH_OPENIMAGEDENOISE)
   add_definitions(-DOIDN_STATIC_LIB)
diff --git a/source/blender/editors/animation/CMakeLists.txt b/source/blender/editors/animation/CMakeLists.txt
index 6fa4d94df3a..0baac40660d 100644
--- a/source/blender/editors/animation/CMakeLists.txt
+++ b/source/blender/editors/animation/CMakeLists.txt
@@ -60,10 +60,6 @@ set(LIB
   bf_blenlib
 )
 
-if(WITH_INTERNATIONAL)
-  add_definitions(-DWITH_INTERNATIONAL)
-endif()
-
 if(WITH_PYTHON)
   add_definitions(-DWITH_PYTHON)
 endif()
diff --git a/source/blender/editors/armature/CMakeLists.txt b/source/blender/editors/armature/CMakeLists.txt
index aff5803f037..c8ca27c64a3 100644
--- a/source/blender/editors/armature/CMakeLists.txt
+++ b/source/blender/editors/armature/CMakeLists.txt
@@ -63,9 +63,5 @@ set(LIB
   bf_blenlib
 )
 
-if(WITH_INTERNATIONAL)
-  add_definitions(-DWITH_INTERNATIONAL)
-endif()
-
 
 blender_add_lib(bf_editor_armature "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/curve/CMakeLists.txt b/source/blender/editors/curve/CMakeLists.txt
index 877c2d99102..0ac572c0422 100644
--- a/source/blender/editors/curve/CMakeLists.txt
+++ b/source/blender/editors/curve/CMakeLists.txt
@@ -51,9 +51,5 @@ set(LIB
   extern_curve_fit_nd
 )
 
-if(WITH_INTERNATIONAL)
-  add_definitions(-DWITH_INTERNATIONAL)
-endif()
-
 
 blender_add_lib(bf_editor_curve "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/gpencil/CMakeLists.txt b/source/blender/editors/gpencil/CMakeLists.txt
index bff7310e9f7..93d17598181 100644
--- a/source/blender/editors/gpencil/CMakeLists.txt
+++ b/source/blender/editors/gpencil/CMakeLists.txt
@@ -86,9 +86,5 @@ if(WITH_POTRACE)
   add_definitions(-DWITH_POTRACE)
 endif()
 
-if(WITH_INTERNATIONAL)
-  add_definitions(-DWITH_INTERNATIONAL)
-endif()
-
 
 blender_add_lib(bf_editor_gpencil "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/interface/interface_style.c b/source/blender/editors/interface/interface_style.c
index 44942d508ca..1fe538eca5d 100644
--- a/source/blender/editors/interface/interface_style.c
+++ b/source/blender/editors/interface/interface_style.c
@@ -39,9 +39,8 @@
 #include "BKE_global.h"
 
 #include "BLF_api.h"
-#ifdef WITH_INTERNATIONAL
-#  include "BLT_translation.h"
-#endif
+
+#include "BLT_translation.h"
 
 #include "UI_interface.h"
 
diff --git a/source/blender/editors/io/CMakeLists.txt b/source/blender/editors/io/CMakeLists.txt
index cb1c3cedf8e..5db16354124 100644
--- a/source/blender/editors/io/CMakeLists.txt
+++ b/source/blender/editors/io/CMakeLists.txt
@@ -84,10 +84,6 @@ if(WITH_USD)
   add_definitions(-DWITH_USD)
 endif()
 
-if(WITH_INTERNATIONAL)
-  add_definitions(-DWITH_INTERNATIONAL)
-endif()
-
 if(WITH_PUGIXML)
   add_definitions(-DWITH_PUGIXML)
 endif()
diff --git a/source/blender/editors/mesh/CMakeLists.txt b/source/blender/editors/mesh/CMakeLists.txt
index 4ad2e57d266..0fb64c8a46b 100644
--- a/source/blender/editors/mesh/CMakeLists.txt
+++ b/source/blender/editors/mesh/CMakeLists.txt
@@ -78,10 +78,6 @@ set(LIB
   bf_windowmanager
 )
 
-if(WITH_INTERNATIONAL)
-  add_definitions(-DWITH_INTERNATIONAL)
-endif()
-
 if(WITH_FREESTYLE)
   add_definitions(-DWITH_FREESTYLE)
 endif()
diff --git a/source/blender/editors/object/CMakeLists.txt b/source/blender/editors/object/CMakeLists.txt
index 040b5cd5066..a953c7d7f89 100644
--- a/source/blender/editors/object/CMakeLists.txt
+++ b/source/blender/editors/object/CMakeLists.txt
@@ -85,10 +85,6 @@ if(WITH_PYTHON)
   add_definitions(-DWITH_PYTHON)
 endif()
 
-if(WITH_INTERNATIONAL)
-  add_definitions(-DWITH_INTERNATIONAL)
-endif()
-
 if(WITH_EXPERIMENTAL_FEATURES)
   add_definitions(-DWITH_SIMULATION_DATABLOCK)
   add_definitions(-DWITH_POINT_CLOUD)
diff --git a/source/blender/editors/physics/CMakeLists.txt b/source/blender/editors/physics/CMakeLists.txt
index a607663763e..7c32a2dcf1d 100644
--- a/source/blender/editors/physics/CMakeLists.txt
+++ b/source/blender/editors/physics/CMakeLists.txt
@@ -60,10 +60,6 @@ if(WITH_MOD_FLUID)
   add_definitions(-DWITH_FLUID)
 endif()
 
-if(WITH_INTERNATIONAL)
-  add_definitions(-DWITH_INTERNATIONAL)
-endif()
-
 if(WITH_BULLET)
   list(APPEND INC
     ../../../../intern/rigidbody
diff --git a/source/blender/editors/render/CMakeLists.txt b/source/blender/editors/render/CMakeLists.txt
index 1f867c6f1f7..934badd3b6f 100644
--- a/source/blender/editors/render/CMakeLists.txt
+++ b/source/blender/editors/render/CMakeLists.txt
@@ -67,8 +67,4 @@ if(WITH_FREESTYLE)
   add_definitions(-DWITH_FREESTYLE)
 endif()
 
-if(WITH_INTERNATIONAL)
-  add_definitions(-DWITH_INTERNATIONAL)
-endif()
-
 blender_add_lib(bf_editor_render "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/scene/CMakeLists.txt b/source/blender/editors/scene/CMakeLists.txt
index cd59f06c6e3..ce0c2062766 100644
--- a/source/blender/editors/scene/CMakeLists.txt
+++ b/source/blender/editors/scene/CMakeLists.txt
@@ -39,8 +39,5 @@ set(LIB
   bf_blenlib
 )
 
-if(WITH_INTERNATIONAL)
-  add_definitions(-DWITH_INTERNATIONAL)
-endif()
 
 blender_add_lib(bf_editor_scene "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/screen/CMakeLists.txt b/source/blender/editors/screen/CMakeLists.txt
index d194d0cdbb6..7c5ae4dcd5e 100644
--- a/source/blender/editors/screen/CMakeLists.txt
+++ b/source/blender/editors/screen/CMakeLists.txt
@@ -57,9 +57,5 @@ set(LIB
   bf_editor_space_sequencer
 )
 
-if(WITH_INTERNATIONAL)
-  add_definitions(-DWITH_INTERNATIONAL)
-endif()
-
 
 blender_add_lib(bf_editor_screen "${SRC}" "${INC}" "${INC_SYS}" "${LIB}")
diff --git a/source/blender/editors/sculpt_paint/CMakeLists.txt b/source/blender/editors/sculpt_paint/CMakeLists.txt
index b15b6784d34..907080626e0 100644
--- a/source/blender/editors/sculpt_paint/CMakeL

@@ Diff output truncated at 10240 characters. @@



More information about the Bf-blender-cvs mailing list