--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -132,7 +132,9 @@ if(WITHOUT_WIN32_CONFIG)
     list(APPEND rdkafka_compile_definitions WITH_SASL_OAUTHBEARER)
   endif(WITH_SASL_OAUTHBEARER)
   if(ENABLE_DEVEL)
-    list(APPEND rdkafka_compile_definitions ENABLE_DEVEL)
+    list(APPEND rdkafka_compile_definitions ENABLE_DEVEL=1)
+  else()
+    list(APPEND rdkafka_compile_definitions ENABLE_DEVEL=0)
   endif(ENABLE_DEVEL)
   if(WITH_PLUGINS)
     list(APPEND rdkafka_compile_definitions WITH_PLUGINS)
