Commit Graph

114 Commits (c4e74319ac6b9ec94e4687fffa8b4c99e315fdae)

Author SHA1 Message Date
Kai Buschulte d66702ba37 Fix CMake build for versions <3.19
CMake <3.19 does not support interface targets with sources.
For better IDE integrations we still can add the config.h using the
`target_sources` command.

Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
3 years ago
Kai Buschulte a883bda9c1 Add CMake test target
Use `ctest` or `make test` to run all tests.
With this it's also possible to run tests on a Mac.

Relative paths used in tests become absolute ones to make tests
executable from any build folder.

Also fixed race condition in
  test/broker/11-persistent-subscription-no-local.py

Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
3 years ago
Kai Buschulte 8b5a86fd52 Introduce config-header cmake target
This is an interface cmake target which specifies include directories
required by the config.h places in the root of the project.

This header is a "public" header visible to plugins linking the
mosquitto exports.

Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
3 years ago
Roger A. Light 51f9a76f03 Merge branch 'macos-cmake-build' of https://github.com/buschulte/mosquitto into buschulte-macos-cmake-build 3 years ago
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>
3 years ago
Kai Buschulte 0e9df05d0d Add imported target for cJSON
Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
3 years ago
Kai Buschulte 15208e55cc Use preinstalled CMake find module for SQLite3
CMake >= 3.14 comes with a preinstalled FindSQLite3 module, which now
replaces the self-written one.

Signed-off-by: Kai Buschulte <kai.buschulte@cedalo.com>
3 years ago
Roger A. Light b922c13509 Compile broker against pthreads if threading enabled.
This allows plugins to *carefully* use threads.
4 years ago
Roger A. Light 7552e944a8 Long overdue bump of in-development version number. 4 years ago
Roger A. Light a0f58f20c3 Update threaded builds.
Most specifically use -pthread instead of -lpthread.
4 years ago
Roger A. Light bc1adfd46d CMake fixes.
Builtin websockets support.
Persist sqlite plugin build.
Broker cJSON support
Add wildcard-temp plugin.
4 years ago
Roger A. Light 6b32cf61b2 CMake build fixes, including sqlite support. 4 years ago
Roger Light 88dfac8e88 Windows threading support for the library. 4 years ago
Roger A. Light aa29b45e70 Merge branch 'master' into develop 4 years ago
Roger A. Light 42acfdad41 Bump version, update web page. 4 years ago
Roger A. Light 49065f03a8 Merge remote-tracking branch 'origin/fixes' into develop 4 years ago
Roger A. Light ea7e2a6bca Bump version, add post. 4 years ago
Roger Light 0a90e62f93 CMake tidy. 4 years ago
Roger Light ef7662ca8e Merge branch 'master' into develop 4 years ago
Roger A. Light e7aa0fed2f Bump version, update web page. 5 years ago
Roger A. Light bb73eed557 Bump version number and update web pages. 5 years ago
Roger A. Light fd036b9435 Merge branch 'fixes' into develop 5 years ago
Roger A. Light abc288a435 Experimental kqueue support. 5 years ago
Roger A. Light cec9d36445 Bump version and web pages. 5 years ago
Roger A. Light c2a26250f6 Bump changelog, versions, and web pages. 5 years ago
Roger A. Light bbe0afbfbe Add missing WITH_CJSON option. 5 years ago
Roger A. Light 53b7cc5fc1 Bump version number, add web post. 5 years ago
Boris Feinstein c16514ca23 perform cjson discovery only if WITH_CJSON=ON
When using cmake to build the project, cJson discovery
should only be performed if WITH_CJSON=ON.

Closes #2026.

Signed-off-by: Boris Feinstein <madhat1@gmail.com>
5 years ago
Roger A. Light ae3800ad66 Bump version number, add www post. 5 years ago
Roger A. Light 5a565da82b Bump version number. Update changelog and web pages. 5 years ago
Roger A. Light d02bc03ed8 Bump version, changelog and webpage. 5 years ago
Pierre Hallot 57d2818a3d
Fix appending CMake module path to existing path
The code would simply append the folder with no separator, resulting in an invalid path if the variable was not empty.
Now properly append it.

Signed-off-by: Pierre Hallot <hallotpierre@gmail.com>
5 years ago
Pierre Hallot ddb0f21ab5
Set cmake_minimum_required first as recommended in the documentation
https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html
"Note Call the cmake_minimum_required() command at the beginning of the top-level CMakeLists.txt file even before calling the project() command. It is important to establish version and policy settings before invoking other commands whose behavior they may affect."

Signed-off-by: Pierre Hallot <hallotpierre@gmail.com>
5 years ago
Pierre Hallot 4dcfe5424f
Remove CMAKE_LEGACY_CYGWIN_WIN32 which is not needed anymore
According to this from the mailing list, it is no longer required since the minimum cmake required is 3.0.

https://cmake.org/pipermail/cmake/2014-July/058048.html
"The code that emits the warning is run by "project()". Since you do not have an explicit project() call in your top-level CMakeLists.txt CMake adds one to the top implicitly. [1]
A project file that explicitly calls project() after requiring CMake >= 2.8.4 should make the warning go away."

Signed-off-by: Pierre Hallot <hallotpierre@gmail.com>
5 years ago
Roger A. Light cc47eaba09 Bump version number and update webpage. 5 years ago
Roger A. Light 66b680af34 Bump version number. 5 years ago
Roger A. Light 6904fac6a4 Bump version number and changelog. 5 years ago
Roger A. Light 2687d18214 macOS build fixes. 5 years ago
Roger A. Light 550c54701e Fix cmake build when cjson not available. 5 years ago
Pierre Hallot 2afc5783a9 CMake: Move cJSON check out of the plugin check since it is required elsewhere
Some client/app code also optionally use cJSON, however it won't be found if plugins are disabled.

Signed-off-by: Pierre Hallot <hallotpierre@gmail.com>
5 years ago
Pierre Hallot 3ac8daa8aa CMake: add options about whether to build the apps and plugins
Useful in case only the lib is needed.

Signed-off-by: Pierre Hallot <hallotpierre@gmail.com>
5 years ago
Arenoros 9c3a214a01 In android ndk doesn't exist librt and libpthread
Signed-off-by: Arenoros <arenoros@gmail.com>
5 years ago
Roger A. Light fdff255916 New dynamic security plugin. 5 years ago
Roger A. Light 89733138bb CMake build fixes. 5 years ago
Roger A. Light c90e49af1b Merge remote-tracking branch 'origin/fixes' into develop 5 years ago
Roger A. Light 39ff7226eb Bump version, add new www posts. 5 years ago
Roger A. Light c9218fd48c Bump version. 5 years ago
Roger A. Light cea0423e69 Update changelog and version. 5 years ago
Roger A. Light f0deb9a5a1 CMake: Make building clients, broker and C++ library optional.
Issue #1641.
6 years ago
Roger A. Light 4ab0f4bd39 Fix bundled deps option not being propagated to library.
Issue #1641.
6 years ago