Since dde005ef92 mosquito_pub is throwing error
that 'threading support has not been compiled' when compiled using cmake.
It looks like WITH_THREADING flag is not set at top level Makefile and used
only in lib/ directory, so library is correctly compiled with threading.
But for client this flag is undefined, so it gives error on '-l' option.
This commit moves part related to WITH_THREADING flag out of lib/CMakeLists.txt
to top levele CMakeLists.txt, so it could be accessible to all subdirectories.
Signed-off-by: Marek Wodzinski <majek@w7i.pl>
The option WITH_PIC is default to OFF.
By default, the static library is built from the
source code directly. If WITH_PIC is enabled, the
static library is built with the same set of
object libraries that the shared library uses.
To link Mosquitto static library into a shared
library, one must enable WITH_PIC to make the
piece of code locatable.
Signed-off-by: Lance Chen <cyen0312@gmail.com>
The shared library fails to link to `handle*` functions
implementd in lib/handle_* because these source file
definitions seem to be removed accidentally in commit
3499c09.
Signed-off-by: Lance Chen <cyen0312@gmail.com>