--- man/CMakeLists.txt.orig	2024-06-03 11:39:00 UTC
+++ man/CMakeLists.txt
@@ -24,13 +24,6 @@ SET(MAN1
 # Copy man pages
 SET(MAN1
   comp_err.1
-  ibd2sdi.1
-  innochecksum.1
-  my_print_defaults.1
-  myisam_ftdump.1
-  myisamchk.1
-  myisamlog.1
-  myisampack.1
   mysql.1
   mysql_config.1
   mysql_config_editor.1
@@ -40,7 +33,6 @@ SET(MAN1
   mysqlbinlog.1
   mysqlcheck.1
   mysqldump.1
-  mysqldumpslow.1
   mysqlimport.1
   mysqlman.1
   mysqlshow.1
@@ -48,13 +40,23 @@ SET(MAN1
   perror.1
   )
 
-IF(NOT WITH_SYSTEMD)
-  LIST(APPEND MAN1
-    mysql.server.1
-    mysqld_multi.1
-    mysqld_safe.1
+SET(MAN1_TOOLS
+  ibd2sdi.1
+  innochecksum.1
+  my_print_defaults.1
+  myisam_ftdump.1
+  myisamchk.1
+  myisamlog.1
+  myisampack.1
+  mysql.server.1
+  mysql_secure_installation.1
+  mysql_ssl_rsa_setup.1
+  mysql_tzinfo_to_sql.1
+  mysql_upgrade.1
+  mysqldumpslow.1
+  mysqld_multi.1
+  mysqld_safe.1
   )
-ENDIF()
 
 SET(MAN1_NDB
   ndb_blob_tool.1
@@ -102,8 +104,14 @@ SET(MAN8_NDB
   ndbmtd.8
 )
 
-INSTALL(FILES ${MAN1} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPages)
-INSTALL(FILES ${MAN8} DESTINATION ${INSTALL_MANDIR}/man8 COMPONENT ManPages)
+IF(NOT WITHOUT_CLIENTLIBS)
+    INSTALL(FILES ${MAN1} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPages)
+ENDIF()
+
+IF(NOT WITHOUT_SERVER)
+    INSTALL(FILES ${MAN1_TOOLS} DESTINATION ${INSTALL_MANDIR}/man1 COMPONENT ManPages)
+    INSTALL(FILES ${MAN8} DESTINATION ${INSTALL_MANDIR}/man8 COMPONENT ManPages)
+ENDIF()
 
 IF(WITH_ROUTER)
   INSTALL(FILES ${MAN1_ROUTER}
