$NetBSD: patch-client_CMakeLists.txt,v 1.2 2022/11/02 17:02:10 jperkin Exp $

Split configuration between mysql-client and mysql-server.

--- client/CMakeLists.txt.orig	2022-09-13 16:15:16.000000000 +0000
+++ client/CMakeLists.txt
@@ -28,6 +28,7 @@ DISABLE_MISSING_PROFILE_WARNING()
 ## Subdirectory with common client code.
 ADD_SUBDIRECTORY(base)
 ## Subdirectory for mysqlpump code.
+IF(WITHOUT_SERVER)
 ADD_SUBDIRECTORY(dump)
 ## Subdirectory for mysql_migrate_keyring code.
 ADD_SUBDIRECTORY(migrate_keyring)
@@ -47,6 +48,7 @@ MYSQL_ADD_EXECUTABLE(mysql
   ${CMAKE_CURRENT_SOURCE_DIR}/common/user_registration.cc
   LINK_LIBRARIES mysqlclient client_base ${EDITLINE_LIBRARY}
   )
+ENDIF()
 
 IF(NOT WITHOUT_SERVER)
   MYSQL_ADD_EXECUTABLE(mysql_upgrade
@@ -55,6 +57,7 @@ IF(NOT WITHOUT_SERVER)
     )
 ENDIF()
 
+IF(NOT WITHOUT_SERVER)
 MYSQL_ADD_EXECUTABLE(mysqltest
   mysqltest.cc
   mysqltest/error_names.cc
@@ -71,6 +74,7 @@ MYSQL_ADD_EXECUTABLE(mysqltest
   ENABLE_EXPORTS
   LINK_LIBRARIES mysqlclient
   )
+ELSE()
 MYSQL_ADD_EXECUTABLE(mysqlcheck
   check/mysqlcheck.cc
   check/mysqlcheck_core.cc
@@ -277,16 +281,20 @@ 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
   )
+ELSE()
 MYSQL_ADD_EXECUTABLE(mysql_ssl_rsa_setup
   logger.cc
   mysql_ssl_rsa_setup.cc
   path.cc
   LINK_LIBRARIES mysys
   )
+ENDIF()
 
 # "WIN32" also covers 64 bit. "echo" is used in some files below "mysql-test/".
 IF(WIN32)
