--- man/CMakeLists.txt.orig	2023-06-21 07:52:10 UTC
+++ man/CMakeLists.txt
@@ -23,26 +23,14 @@ SET(MAN1
 # Copy man pages
 SET(MAN1
   comp_err.1
-  ibd2sdi.1
-  innochecksum.1
   lz4_decompress.1
-  my_print_defaults.1
-  myisam_ftdump.1
-  myisamchk.1
-  myisamlog.1
-  myisampack.1
   mysql.1
   mysql_config.1
   mysql_config_editor.1
-  mysql_secure_installation.1
-  mysql_ssl_rsa_setup.1
-  mysql_tzinfo_to_sql.1
-  mysql_upgrade.1
   mysqladmin.1
   mysqlbinlog.1
   mysqlcheck.1
   mysqldump.1
-  mysqldumpslow.1
   mysqlimport.1
   mysqlman.1
   mysqlpump.1
@@ -52,13 +40,23 @@ SET(MAN1
   zlib_decompress.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
@@ -105,8 +103,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}
