Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,3 +99,28 @@ 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")
Comment thread
Daniel-Fundarek marked this conversation as resolved.
set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Daniel Fundarek")
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
"libzmq3-dev"
)

set(CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
)
set(CPACK_SET_DESTDIR OFF)
set(CPACK_PACKAGING_INSTALL_PREFIX "/usr/local")
Comment thread
Daniel-Fundarek marked this conversation as resolved.

include(CPack)
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,20 @@ 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 the Debian package via apt.
- `git clone https://github.com/zeromq/cppzmq.git`
- `cd cppzmq`
- `mkdir build`
- `cd build`
- `cmake ..`
- `make -j$(nproc)`
- `cpack`
- `sudo apt install ./cppzmq*.deb`


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`
Expand Down