From 427e01d94fb1e73ab8665800ee0330cc22c9179b Mon Sep 17 00:00:00 2001 From: Daniel Fundarek Date: Mon, 11 May 2026 16:59:58 +0200 Subject: [PATCH 1/5] feat: disable test builds by default and add packaging configuration for DEB --- CMakeLists.txt | 25 ++++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3035755..b43c9b7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -90,7 +90,7 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/libzmq-pkg-config/FindZeroMQ.cmake DESTINATION ${CPPZMQ_CMAKECONFIG_INSTALL_DIR}/libzmq-pkg-config) -option(CPPZMQ_BUILD_TESTS "Whether or not to build the tests" ON) +option(CPPZMQ_BUILD_TESTS "Whether or not to build the tests" OFF) if (CPPZMQ_BUILD_TESTS) enable_testing() @@ -99,3 +99,26 @@ if (CPPZMQ_BUILD_TESTS) add_subdirectory(examples) endif() endif() + + +############# +# Packaging # +############# + +include(InstallRequiredSystemLibraries) +set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") +set(CPACK_GENERATOR "DEB") +set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Daniel Fundarek") +set(CPACK_PACKAGE_DESCRIPTION "cppzmq is a C++ binding for libzmq.") +set(CPACK_PACKAGE_CONTACT "daniel.fundarek@airvolute.com") +set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) +set(CPACK_DEBIAN_PACKAGE_DEPENDS + "libzmq3-dev (>= ${ZeroMQ_VERSION})" +) + +set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA +) +set(CPACK_SET_DESTDIR OFF) +set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/local") + +include(CPack) \ No newline at end of file From 83999f4256cf220728c78120a11db29a33013df2 Mon Sep 17 00:00:00 2001 From: Daniel Fundarek Date: Tue, 12 May 2026 08:18:51 +0200 Subject: [PATCH 2/5] docs: update build instructions to include installation of libzmq from apt repository --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 5d804d0..45a0ebe 100644 --- a/README.md +++ b/README.md @@ -161,6 +161,19 @@ Build instructions ================== Build steps: +1.Install libzmq from apt repository + - `sudo apt install libzmq3-dev` +2. Build cppzmq via cmake. pack with cpack and install debian package via apt. + - `git clone https://github.com/zeromq/cppzmq.git` + - `cd cppzmq` + - `mkdir build` + - `cd build` + - `make -j(n_proc)` + - `cpack` + - `sudo apt install cppzmq` + + +or use legacy build: 1. Build [libzmq](https://github.com/zeromq/libzmq) via cmake. This does an out of source build and installs the build files - `git clone https://github.com/zeromq/libzmq.git` From 6ef4be6e35f0dbacdd2da79b2ddaa56775df2e1a Mon Sep 17 00:00:00 2001 From: Daniel Fundarek Date: Tue, 12 May 2026 08:19:10 +0200 Subject: [PATCH 3/5] docs: update installation instructions for cppzmq package --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 45a0ebe..1ce9a84 100644 --- a/README.md +++ b/README.md @@ -170,7 +170,7 @@ Build steps: - `cd build` - `make -j(n_proc)` - `cpack` - - `sudo apt install cppzmq` + - `sudo apt install ./cppzmq*` or use legacy build: From 55e8291ec5ae53719fe8189a02699a389e326bcb Mon Sep 17 00:00:00 2001 From: Daniel Fundarek Date: Tue, 12 May 2026 08:32:31 +0200 Subject: [PATCH 4/5] docs: enhance package description for cppzmq Debian package --- CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b43c9b7..018e31c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -109,7 +109,9 @@ include(InstallRequiredSystemLibraries) set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE") set(CPACK_GENERATOR "DEB") set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Daniel Fundarek") -set(CPACK_PACKAGE_DESCRIPTION "cppzmq is a C++ binding for libzmq.") +set(CPACK_PACKAGE_DESCRIPTION + "cppzmq project provides a C++ binding for the libzmq library. + Installation of cppzmq debian package also installs libzmq3-dev as dependency.") set(CPACK_PACKAGE_CONTACT "daniel.fundarek@airvolute.com") set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) set(CPACK_DEBIAN_PACKAGE_DEPENDS From 78e4177f58b6c7c6cc8ce0139a9c54c02e4bdf5a Mon Sep 17 00:00:00 2001 From: Daniel-Fundarek <79155394+Daniel-Fundarek@users.noreply.github.com> Date: Tue, 12 May 2026 09:18:13 +0200 Subject: [PATCH 5/5] Apply suggestions from code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- CMakeLists.txt | 4 ++-- README.md | 7 ++++--- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 018e31c..5e06f36 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -90,7 +90,7 @@ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}Config.cmake install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/libzmq-pkg-config/FindZeroMQ.cmake DESTINATION ${CPPZMQ_CMAKECONFIG_INSTALL_DIR}/libzmq-pkg-config) -option(CPPZMQ_BUILD_TESTS "Whether or not to build the tests" OFF) +option(CPPZMQ_BUILD_TESTS "Whether or not to build the tests" ON) if (CPPZMQ_BUILD_TESTS) enable_testing() @@ -115,7 +115,7 @@ set(CPACK_PACKAGE_DESCRIPTION set(CPACK_PACKAGE_CONTACT "daniel.fundarek@airvolute.com") set(CPACK_DEBIAN_FILE_NAME DEB-DEFAULT) set(CPACK_DEBIAN_PACKAGE_DEPENDS - "libzmq3-dev (>= ${ZeroMQ_VERSION})" + "libzmq3-dev" ) set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA diff --git a/README.md b/README.md index 1ce9a84..f0b1d17 100644 --- a/README.md +++ b/README.md @@ -163,14 +163,15 @@ Build instructions Build steps: 1.Install libzmq from apt repository - `sudo apt install libzmq3-dev` -2. Build cppzmq via cmake. pack with cpack and install debian package via apt. +2. Build cppzmq via cmake, pack with cpack, and install the Debian package via apt. - `git clone https://github.com/zeromq/cppzmq.git` - `cd cppzmq` - `mkdir build` - `cd build` - - `make -j(n_proc)` + - `cmake ..` + - `make -j$(nproc)` - `cpack` - - `sudo apt install ./cppzmq*` + - `sudo apt install ./cppzmq*.deb` or use legacy build: