--- client/CMakeLists.txt.orig	2025-10-25 17:10:08.871647000 +0200
+++ client/CMakeLists.txt	2025-10-25 17:28:15.270525000 +0200
@@ -26,9 +26,12 @@ DISABLE_MISSING_PROFILE_WARNING()
 # We are not interesting in profiling clients.
 DISABLE_MISSING_PROFILE_WARNING()
 
+IF(WITHOUT_SERVER)
 ## Subdirectory for mysql_migrate_keyring code.
 ADD_SUBDIRECTORY(migrate_keyring)
+ENDIF()
 
+IF(WITHOUT_SERVER)
 MYSQL_ADD_EXECUTABLE(mysql
   ${CMAKE_SOURCE_DIR}/sql-common/net_ns.cc
   completion_hash.cc
@@ -42,7 +45,9 @@ MYSQL_ADD_EXECUTABLE(mysql
   ${CMAKE_SOURCE_DIR}/sql-common/sql_string.cc
   LINK_LIBRARIES mysqlclient ${EDITLINE_LIBRARY}
   )
+ENDIF()
 
+IF(NOT WITHOUT_SERVER)
 MYSQL_ADD_EXECUTABLE(mysqltest
   mysqltest.cc
   mysqltest/error_names.cc
@@ -59,9 +64,11 @@ MYSQL_ADD_EXECUTABLE(mysqltest
   ENABLE_EXPORTS
   LINK_LIBRARIES mysqlclient
   )
+ENDIF()
 
 DOWNGRADE_STRINGOP_WARNINGS(mysqltest)
 
+IF(WITHOUT_SERVER)
 MYSQL_ADD_EXECUTABLE(mysqlcheck
   check/mysqlcheck.cc
   check/mysqlcheck_core.cc
@@ -289,7 +296,9 @@ TARGET_INCLUDE_DIRECTORIES(mysqlbinlog PRIVATE ${CMAKE
 
 TARGET_COMPILE_DEFINITIONS(mysqlbinlog PRIVATE DISABLE_PSI_MUTEX)
 TARGET_INCLUDE_DIRECTORIES(mysqlbinlog PRIVATE ${CMAKE_SOURCE_DIR}/sql)
+ENDIF()
 
+IF(WITHOUT_SERVER)
 MYSQL_ADD_EXECUTABLE(mysqladmin
   mysqladmin.cc
   multi_factor_passwordopt-vars.cc
@@ -304,10 +313,14 @@ MYSQL_ADD_EXECUTABLE(mysql_config_editor
   mysql_config_editor.cc
   LINK_LIBRARIES mysqlclient
   )
+ENDIF()
+  
+IF(NOT WITHOUT_SERVER)  
 MYSQL_ADD_EXECUTABLE(mysql_secure_installation
   mysql_secure_installation.cc
   LINK_LIBRARIES mysqlclient
   )
+ENDIF()
 
 # "WIN32" also covers 64 bit. "echo" is used in some files below "mysql-test/".
 IF(WIN32)
