Not able to get eclipse paho working with ssl
<p>I need some help with enabling SSL in eclipse paho.
To download and build paho I am using "ExternalProject_Add" :</p>

<pre><code>externalproject_add(
paho
DEPENDS libressl
DOWNLOAD_DIR ${CMAKE_SOURCE_DIR}/externals/paho
GIT_REPOSITORY "https://github.com/eclipse/paho.mqtt.c.git"
GIT_TAG "83cc318c96d508dd2ef26e87da23a858ff073b56"
UPDATE_COMMAND ""
PATCH_COMMAND ""
CMAKE_ARGS -DPAHO_WITH_SSL=TRUE -DBUILD_SHARED_LIBS=OFF -DOPENSSL_INC_SEARCH_PATH=${CMAKE_BINARY_DIR}/include -DOPENSSL_LIB_SEARCH_PATH=${CMAKE_BINARY_DIR}/lib -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}
BUILD_IN_SOURCE 1
</code></pre>

<p>As you can see I set the "CMAKE_ARGS" for using SSL. 
So far everythink works totally fine.</p>

<p>I have written a small program to verify that SSL is included in my paho version. The Code of thiss programm looks like this:</p>

<pre><code>#include "stdio.h"
#include &lt;MQTTClient.h&gt;

int main(int argc, char* argv[])
{
   MQTTClient_nameValue* test=MQTTClient_getVersionInfo();
   for (int i=0;i&lt;8;i++)if (test[i].name!=0)printf("test2: %i %s\n",i,test[i].name);
   return 0;
}
</code></pre>

<p>What it does is that it puts out some version information. </p>

<pre><code>test2: 0 Product name
test2: 1 Version
test2: 2 Build level
</code></pre>

<p>At position 3 should be some SSL output if everything works fine, but like you see it isn't.</p>

<p>The CMake commands for this little program are like this:</p>

<pre><code>add_executable(test_pahoSSL testPahoSSL.cpp)
target_link_libraries(test_pahoSSL ${CMAKE_BINARY_DIR}/lib/libpaho-qtt3as.so ${CMAKE_BINARY_DIR}/lib/libpaho-mqtt3cs.so)
</code></pre>

<p>From this site <a href="https://github.com/eclipse/paho.mqtt.c" rel="nofollow">https://github.com/eclipse/paho.mqtt.c</a> i got the information that i need to link xxx3as.so &amp; xxx3cs.so which should be the libs which include SSL support. </p>

<p>When I hard-code a </p>

<pre><code>#define OPENSSL 1
</code></pre>

<p>in the "MQTTCLinet.h" my test-program gives the extended output (with SLL).</p>

<p>From the build and linking process everything seems to work fine, but i don't get any SSL information output. Can someone point out the mistake(s) I am doing ?</p>

<p>Thanks in advance!</p>