From 53b46d63b41c51e32b5d539aa78ca91846f6a2a1 Mon Sep 17 00:00:00 2001
From: Stephan Guilloux <stephan.guilloux@crisalid.com>
Date: Fri, 6 Jun 2025 16:55:13 +0200
Subject: [PATCH] Problem: CMakeLists.txt broken since CMake 4 support.

Solution: Regenerate from ZProject.
---
 CMakeLists.txt | 63 +++++++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 62 insertions(+), 1 deletion(-)

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -757,4 +757,65 @@ if (NOT TARGET distclean)
                         ${PROJECT_BINARY_DIR}/src/libczmq.pc
                         ${PROJECT_BINARY_DIR}/src/libczmq.so
                         ${PROJECT_BINARY_DIR}/src/czmq_selftest
-    .for project.main
+                        ${PROJECT_BINARY_DIR}/src/zmakecert
+                        ${PROJECT_BINARY_DIR}/src/zsp
+                        ${PROJECT_BINARY_DIR}/src/test_randof
+                        ${PROJECT_BINARY_DIR}/src/czmq_selftest
+    )
+    add_custom_target(distclean
+        COMMAND ${rm_command} CMakeTmp ${cmake_generated}
+        COMMENT Cleaning for source distribution
+    )
+endif()
+
+include(ClangFormat OPTIONAL)
+
+########################################################################
+# summary
+########################################################################
+message ("")
+message (STATUS "******************* Configuration Summary *******************")
+message (STATUS "General:")
+message (STATUS "  Version           :   ${VERSION}")
+message (STATUS "  System            :   ${CMAKE_SYSTEM_NAME}")
+message (STATUS "  C compiler        :   ${CMAKE_C_COMPILER}")
+message (STATUS "  Debug C flags     :   ${CMAKE_C_FLAGS_DEBUG} ${CMAKE_C_FLAGS}")
+message (STATUS "  Release C flags   :   ${CMAKE_C_FLAGS_RELEASE} ${CMAKE_C_FLAGS}")
+message (STATUS "  Build type        :   ${CMAKE_BUILD_TYPE}")
+message (STATUS "  Static build      :   ${CZMQ_BUILD_STATIC}")
+message (STATUS "  Shared build      :   ${CZMQ_BUILD_SHARED}")
+IF (ENABLE_DRAFTS)
+message (STATUS "  Draft API         :   Yes")
+ELSE (ENABLE_DRAFTS)
+message (STATUS "  Draft API         :   No")
+ENDIF (ENABLE_DRAFTS)
+message (STATUS "")
+message (STATUS "Dependencies:")
+include(FeatureSummary)
+feature_summary (WHAT ALL FATAL_ON_MISSING_REQUIRED_PACKAGES)
+message (STATUS "")
+message (STATUS "Install:")
+message (STATUS "  Install prefix    :" "${CMAKE_INSTALL_PREFIX}")
+message (STATUS "")
+message (STATUS "************************* Options ***************************")
+message (STATUS "Options:")
+message (STATUS "  Use the Draft API (default = yes):")
+message (STATUS "  -DENABLE-DRAFTS=[yes|no]")
+message (STATUS "")
+message (STATUS "*************************************************************")
+message (STATUS "Configuration complete! Now procced with:")
+message (STATUS "  'make'                 compile the project")
+message (STATUS "  'make test'            run the project's selftest")
+message (STATUS "  'make install'         install the project to ${CMAKE_INSTALL_PREFIX}")
+message (STATUS "")
+message (STATUS "Further options are:")
+message (STATUS "  'ctest -V              run test with verbose logging")
+message (STATUS "  'ctest -R <test_name>' run a specific test")
+message (STATUS "  'ctest -T memcheck'    run the project's selftest with")
+message (STATUS "                         valgrind to check for memory leaks")
+message (STATUS "")
+
+################################################################################
+#  THIS FILE IS 100% GENERATED BY ZPROJECT; DO NOT EDIT EXCEPT EXPERIMENTALLY  #
+#  Read the zproject/README.md for information about making permanent changes. #
+################################################################################
