Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
paho.mqtt.c
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
eclipse
paho.mqtt.c
Commits
83087449
Commit
83087449
authored
Mar 24, 2017
by
Ian Craggs
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Build TLS libraries on Windows
parent
5db08261
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
66 additions
and
56 deletions
+66
-56
CMakeLists.txt
CMakeLists.txt
+1
-1
appveyor.yml
appveyor.yml
+7
-1
cbuild.bat
cbuild.bat
+2
-1
CMakeLists.txt
src/CMakeLists.txt
+8
-4
paho_c_pub.c
src/samples/paho_c_pub.c
+1
-3
paho_c_sub.c
src/samples/paho_c_sub.c
+16
-19
paho_cs_pub.c
src/samples/paho_cs_pub.c
+1
-3
paho_cs_sub.c
src/samples/paho_cs_sub.c
+20
-21
CMakeLists.txt
test/CMakeLists.txt
+9
-3
test3.c
test/test3.c
+1
-0
No files found.
CMakeLists.txt
View file @
83087449
...
...
@@ -63,7 +63,7 @@ IF(CMAKE_SYSTEM_NAME MATCHES "Linux")
ENDIF
()
IF
(
WIN32
)
ADD_DEFINITIONS
(
-D
WIN32 -D_WINDOWS -D_CRT_SECURE_NO_DEPRECATE
)
ADD_DEFINITIONS
(
-D
_CRT_SECURE_NO_DEPRECATE -DWIN32_LEAN_AND_MEAN -MD
)
ELSEIF
(
${
CMAKE_SYSTEM_NAME
}
STREQUAL
"Darwin"
)
ADD_DEFINITIONS
(
-DOSX
)
ENDIF
()
...
...
appveyor.yml
View file @
83087449
...
...
@@ -2,7 +2,11 @@ version: 1.0.{build}
image
:
Visual Studio 2015
configuration
:
Debug
install
:
-
cmd
:
cinst openssl.light
-
ps
:
cinst openssl.light -y
-
ps
:
(new-object net.webclient).DownloadFile('https://eclipse.org/downloads/download.php?file=/mosquitto/binary/win32/mosquitto-1.4.11-install-win32.exe', 'mosquitto-1.4.11-install-win32.exe')
-
ps
:
mosquitto-1.4.11-install-win32.exe /S
-
ps
:
taskkill
-
ps
:
(new-object net.webclient).DownloadFile('ftp://sources.redhat.com/pub/pthreads-win32/dll-latest/dll/x86/pthreadVC2.dll', "C:\Program Files (x86)\mosquitto\pthreadVC2.dll")
build_script
:
-
cmd
:
>
-
mkdir build.paho
...
...
@@ -15,6 +19,8 @@ build_script:
nmake
python ..\test\mqttsas2.py mqtt.iotree.co.uk
ctest -T test -VV
cd ..
...
...
cbuild.bat
View file @
83087449
setlocal
rmdir /s /q build.paho
mkdir build.paho
cd build.paho
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" x64
cmake -G "NMake Makefiles" -DPAHO_WITH_SSL=
FALS
E -DPAHO_BUILD_DOCUMENTATION=FALSE -DPAHO_BUILD_SAMPLES=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=TRUE ..
cmake -G "NMake Makefiles" -DPAHO_WITH_SSL=
TRU
E -DPAHO_BUILD_DOCUMENTATION=FALSE -DPAHO_BUILD_SAMPLES=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=TRUE ..
nmake
...
...
src/CMakeLists.txt
View file @
83087449
...
...
@@ -36,14 +36,18 @@ IF (PAHO_WITH_SSL)
SET
(
OPENSSL_BREW_PATH
"/usr/local/opt/openssl"
)
ENDIF
(
${
CMAKE_SYSTEM_NAME
}
STREQUAL
"Darwin"
)
IF
(
WIN32
)
SET
(
OPENSSL_DIR $ENV{OPENSSL_DIR}
)
ENDIF
()
FIND_PATH
(
OPENSSL_INCLUDE_DIR openssl/ssl.h
HINTS
${
OPENSSL_INC_SEARCH_PATH
}
/include
${
OPENSSL_BREW_PATH
}
/include/
)
FIND_LIBRARY
(
OPENSSL_LIB NAMES ssl libssl
HINTS
${
OPENSSL_INC_SEARCH_PATH
}
/include
${
OPENSSL_
DIR
}
/include
${
OPENSSL_
BREW_PATH
}
/include/
)
FIND_LIBRARY
(
OPENSSL_LIB NAMES ssl libssl
ssleay32
HINTS
${
OPENSSL_BREW_PATH
}
/lib
${
OPENSSL_DIR
}
/lib
${
OPENSSL_DIR
}
/lib64
)
FIND_LIBRARY
(
OPENSSLCRYPTO_LIB NAMES crypto libcrypto
FIND_LIBRARY
(
OPENSSLCRYPTO_LIB NAMES crypto libcrypto
libeay32
HINTS
${
OPENSSL_BREW_PATH
}
/lib
${
OPENSSL_DIR
}
/lib
${
OPENSSL_DIR
}
/lib64
)
MESSAGE
(
STATUS
"OpenSSL hint
${
PENSSL_INC_SEARCH_PATH
}
(includes) / "
)
MESSAGE
(
STATUS
"OpenSSL hint
${
O
PENSSL_INC_SEARCH_PATH
}
(includes) / "
)
MESSAGE
(
STATUS
"OpenSSL headers found at
${
OPENSSL_INCLUDE_DIR
}
"
)
MESSAGE
(
STATUS
"OpenSSL library found at
${
OPENSSL_LIB
}
"
)
MESSAGE
(
STATUS
"OpenSSL Crypto library found at
${
OPENSSLCRYPTO_LIB
}
"
)
...
...
src/samples/paho_c_pub.c
View file @
83087449
...
...
@@ -42,15 +42,13 @@
#include <stdio.h>
#include <signal.h>
#include <memory.h>
#include <stdlib.h>
#if defined(WIN32)
#include <Windows.h>
#define sleep Sleep
#else
#include <unistd.h>
#include <sys/time.h>
#include <stdlib.h>
#include <unistd.h>
#endif
...
...
src/samples/paho_c_sub.c
View file @
83087449
...
...
@@ -45,14 +45,13 @@
#include <stdio.h>
#include <signal.h>
#include <memory.h>
#include <stdlib.h>
#if defined(WIN32)
#include <windows.h>
#define sleep Sleep
#else
#include <sys/time.h>
#include <stdlib.h>
#include <unistd.h>
#endif
...
...
@@ -357,5 +356,3 @@ exit:
return
EXIT_SUCCESS
;
}
src/samples/paho_cs_pub.c
View file @
83087449
...
...
@@ -41,14 +41,12 @@
#include <stdio.h>
#include <signal.h>
#include <memory.h>
#include <stdlib.h>
#if defined(WIN32)
#include <Windows.h>
#define sleep Sleep
#else
#include <sys/time.h>
#include <stdlib.h>
#endif
...
...
src/samples/paho_cs_sub.c
View file @
83087449
...
...
@@ -44,14 +44,13 @@
#include <stdio.h>
#include <signal.h>
#include <memory.h>
#include <stdlib.h>
#if defined(WIN32)
#include <windows.h>
#define sleep Sleep
#else
#include <sys/time.h>
#include <stdlib.h>
#endif
...
...
test/CMakeLists.txt
View file @
83087449
PROJECT
(
mqtt-tests
)
SET
(
MQTT_TEST_BROKER
"tcp://localhost:1883"
CACHE STRING
"Hostname of a test MQTT broker to use"
)
SET
(
MQTT_TEST_PROXY
"tcp://localhost:1884"
CACHE STRING
"Hostname of the test proxy to use"
)
SET
(
MQTT_SSL_HOSTNAME
"localhost"
CACHE STRING
"Hostname of a test SSL MQTT broker to use"
)
IF
(
WIN32
)
SET
(
MQTT_TEST_BROKER
"tcp://mqtt.iotree.co.uk:1883"
CACHE STRING
"Hostname of a test MQTT broker to use"
)
SET
(
MQTT_TEST_PROXY
"tcp://localhost:1883"
CACHE STRING
"Hostname of the test proxy to use"
)
SET
(
MQTT_SSL_HOSTNAME
"mqtt.iotree.co.uk"
CACHE STRING
"Hostname of a test SSL MQTT broker to use"
)
ELSE
()
SET
(
MQTT_TEST_BROKER
"tcp://localhost:1883"
CACHE STRING
"Hostname of a test MQTT broker to use"
)
SET
(
MQTT_TEST_PROXY
"tcp://localhost:1884"
CACHE STRING
"Hostname of the test proxy to use"
)
SET
(
MQTT_SSL_HOSTNAME
"localhost"
CACHE STRING
"Hostname of a test SSL MQTT broker to use"
)
ENDIF
()
SET
(
CERTDIR $ENV{TRAVIS_BUILD_DIR}/test/ssl
)
ADD_EXECUTABLE
(
...
...
test/test3.c
View file @
83087449
...
...
@@ -31,6 +31,7 @@
#include <errno.h>
#else
#include <windows.h>
#include <applink.c>
#define MAXHOSTNAMELEN 256
#define snprintf _snprintf
#define setenv(a, b, c) _putenv_s(a, b)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment