83 Commits

Author SHA1 Message Date
Rich Mattes
ab4ac42b90 Fix libdir location in pkgconfig files.
The pkgconfig files currently hardcode the library directory as
${prefix}/lib, but the library installation directory in config.mk is
set as lib${LIB_SUFFIX}.  This causes a mismatch between the library
installation directory and the pkgconfig file on redhat-based 64-bit
systems.

This commit remedies the issue for both the Makefile and CMake build by
modifying the pkgconfig files to use CMAKE_INSTALL_LIBDIR instead of
"lib".  In the CMake system, this directly reflects the installation
path.  The Makefiles were modified to replace CMAKE_INSTALL_LIBDIR with
lib${LIB_SUFFIX}, matching the libdir definition in config.mk and
following the pattern used in defining the prefix.

Signed-off-by: Rich Mattes <richmattes@gmail.com>
2025-12-08 20:57:17 +00:00
Roger A. Light
4c24b92e34 Formatting: Apply to C++ files 2025-09-17 12:48:02 +01:00
Roger A. Light
ee485341dd Merge branch 'develop' of github.com:andreaskem/mosquitto into andreaskem-develop 2025-02-25 17:02:16 +00:00
Roger A. Light
a2fe980301 Add mosquitto_ext_auth_continue() 2024-10-28 22:31:44 +00:00
Roger A. Light
4498193331 Refactor file functions to common static library. 2024-03-17 23:13:11 +00:00
Roger A. Light
d17a88d916 Refactor headers for easier discovery. 2023-12-23 12:59:58 +00:00
Roger A. Light
c8e313aac0 Fix build
This is for the case where command line overrides are set.
2023-09-19 22:48:24 +01:00
Roger A. Light
a31bee722f Simplify make build. 2023-05-10 16:20:06 +01:00
Roger A. Light
fd330de080 client_id -> clientid rename. 2023-01-16 18:46:35 +00:00
Roger A. Light
343a984083 Big rejig of library tests
Includes full consistency between C/C++ library tests
2023-01-02 11:45:09 +00:00
Roger A. Light
27941ae9c2 Fix Coverity Scan 1499830 2022-10-16 14:48:26 +01:00
Kai Buschulte
c646172c05 set mqtt v5 callbacks in C++ wrapper of lib
This caused "unused function" warnings

Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
2022-08-29 11:21:50 +00:00
Roger A. Light
f5a09992be Fix cpp include build 2022-08-17 19:52:30 +01:00
Kai Buschulte
ddd16d54be Make required includes public for libmosquitto
for simplified usage of the CMake target

Issue number: #2452

Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
2022-08-08 12:24:15 +02:00
Kai Buschulte
8b67883548 Remove old compatibility header support
Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
2022-08-08 09:25:16 +00:00
Kai Buschulte
71456077ad Introduce a common-options cmake target
this makes it possible to explicitly share compile options, without
using the `add_definition` function. This function declares options for
the current directory and below (in our case also for `deps`).

Adding -Wall, -Wconversion and -Wextra to at least make compiler
warnings visible for the cmake build.

Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
2022-07-04 11:16:01 +02:00
Roger A. Light
436635fda8 Use absolute rather than relative paths when installing. 2022-06-22 22:43:39 +01:00
Alex Martens
bb33c503b6 Fix install path to mosquittopp.h
Signed-off-by: Alex Martens <eclipse@thinglab.org>
2022-06-05 15:39:48 -07:00
Andreas Kempf
28e3495012 Enable building on AIX
The AIX operating system by IBM does not provide the getifaddrs function
and requires a custom linker script syntax. This commit allows for a
basic GCC build on AIX 7.2.

The build was tested using the command lines

make CC=gcc WITH_CJSON=no WITH_DOCS=no WITH_STATIC_LIBRARIES=yes
and
CC=gcc cmake <srcpath> -DDOCUMENTATION=no

At this point, the persistence test suite seems to fail. The library, as
well as the mosquitto_sub and mosquitto_pub executables were tested and
appear to be functional.

Signed-off-by: Andreas Kempf <aakempf@gmail.com>
2022-05-18 17:20:41 +02:00
Kai Buschulte
7e4746aac4 Fix missing symbols MacOS
Core symbols needed by plugins are now properly linked to their objects

 * Remove link_directories() call:

This specification is not necessary for our own libraries as cmake
shares this information over the targets.

If needed they should be specified target specific, like done for
the external DLT library.

Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
2022-05-11 07:01:22 +00:00
Roger A. Light
efc8d064de Bring mosquittopp more up to date with libmosquitto. 2022-04-15 23:48:31 +01:00
Roger A. Light
5fcb2bc13f Simplify use of headers. 2022-04-15 23:08:21 +01:00
Roger A. Light
4c72542eae Move mosquittopp header to include dir. 2022-04-15 22:08:49 +01:00
Roger A. Light
a0f58f20c3 Update threaded builds.
Most specifically use -pthread instead of -lpthread.
2022-02-09 22:19:35 +00:00
Roger A. Light
5a3b42d4a4 Use path vars in Makefiles. 2022-02-09 14:44:09 +00:00
Roger A. Light
6b32cf61b2 CMake build fixes, including sqlite support. 2022-02-04 14:53:19 +00:00
Roger A. Light
2501a64035 Merge branch 'master' into develop 2021-11-23 12:53:50 +00:00
Roger A. Light
94fcd470d0 Fix incorrect subscribe_callback in mosquittopp.h.
Closes #2367. Thanks to Jens Alfke.
2021-11-17 00:23:04 +00:00
Konstantin Podsvirov
6187143384 Set ARCHIVE DESTINATION for mosquittopp library
Signed-off-by: Konstantin Podsvirov <konstantin@podsvirov.pro>
2021-11-06 16:10:45 +03:00
Roger Light
cd07f1136b Bump copyrights. 2021-11-03 22:10:06 +00:00
Roger A. Light
8ac11929cc Merge branch 'master' into develop 2021-10-27 17:19:33 +01:00
Roger A. Light
a1a190b482 Pointless whitespace tidy. 2021-10-05 15:20:37 +01:00
Roger Light
0a90e62f93 CMake tidy. 2021-05-10 00:39:46 +01:00
Roger A. Light
584cf51ba7 Update to EPL-2.0 2020-11-25 17:34:21 +00:00
Roger A. Light
c2651cf005 Remove deprecation warning on libmosquittopp. 2020-11-05 22:38:35 +00:00
Roger A. Light
89733138bb CMake build fixes. 2020-10-13 16:07:35 +01:00
Roger A. Light
7f41e37f0f Fix use of sed on BSD.
Closes #1614. Thanks to Christoph Krey.
2020-03-12 11:52:58 +00:00
Roger A. Light
a0e7165a9c Fix WITH_STATIC_LIBRARIES using CMake on Windows
Closes #1369. Thanks to TimmvonderMehden
2019-08-06 12:01:29 +01:00
Roger A. Light
b6dc98215a Windows build fixes. 2019-04-30 14:33:18 +01:00
Roger A. Light
439575475c Use CMAKE_INSTALL_* variables when installing in CMake.
Closes #1049. Thanks to Greg Troxel.
2019-04-26 17:07:05 +01:00
Roger A. Light
efa649f451 Don't call ldconfig in CMake scripts.
Closes #1048. Thanks to Greg Troxel.
2019-04-26 17:07:02 +01:00
Roger A. Light
3b4a5419c3 Build fixes around CFLAGS et al.
- Split CFLAGS and CPPFLAGS, and LDFLAGS and LDADD/LIBADD.
- test/unit now respects CPPFLAGS and LDFLAGS.

Closes #1232. Thanks to Greg Troxel.
2019-04-26 17:06:54 +01:00
Roger A. Light
4dcd977932 Windows build fixes. 2019-04-17 20:09:59 +01:00
Roger A. Light
f42a72b46b Deprecation warnings for C++ wrapper. 2019-04-17 11:31:15 +01:00
Roger A. Light
1220ba4bfe Rejig OCSP code. 2019-03-26 22:13:42 +00:00
Roger A. Light
ea046c2405 Merge branch 'master' of git://github.com/LarsVoelker/mosquitto into LarsVoelker-master 2019-03-26 18:36:13 +00:00
Roger A. Light
320ddc1303 Merge branch 'master'
Conflicts:
	CMakeLists.txt
	ChangeLog.txt
	client/Makefile
	config.mk
	installer/mosquitto.nsi
	installer/mosquitto64.nsi
	lib/mosquitto.h
	lib/mqtt3_protocol.h
	lib/util_mosq.c
	set-version.sh
	snap/snapcraft.yaml
	src/bridge.c
	src/database.c
	src/handle_connack.c
	src/loop.c
	src/persist.c
	test/broker/Makefile
2019-03-16 10:05:38 +00:00
Roger A. Light
2dd24449ad Fix "unused parameter" warnings. 2019-03-13 14:46:05 +00:00
Roger A. Light
ce31269e05 Update changelog, bump version, bump copyright year. 2019-02-28 16:56:15 +00:00
Roger A. Light
70c4097b6f Fix comparison of boolean values in CMake build.
Closes #1101. Thanks to Mojca Miklavec and Andrew L. Moore.
2019-02-08 13:01:07 +00:00