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
d291350f
Commit
d291350f
authored
Mar 01, 2017
by
Ian Craggs
Committed by
GitHub
Mar 01, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #214 from orpiske/openssl-osx-fix
Proposed fix for OpenSSL compilation issue on OS X
parents
19eef0f3
c5f9c45b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
19 deletions
+36
-19
.travis.yml
.travis.yml
+6
-2
CMakeLists.txt
src/CMakeLists.txt
+30
-17
No files found.
.travis.yml
View file @
d291350f
...
...
@@ -7,6 +7,10 @@ compiler:
os
:
-
linux
-
osx
before_install
:
-
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew install openssl ; fi
script
:
-
make
-
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then mkdir build.paho ; cd build.paho; cmake -DPAHO_WITH_SSL=TRUE -DPAHO_BUILD_DOCUMENTATION=FALSE -DPAHO_BUILD_SAMPLES=TRUE .. ; make ; fi
-
if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then make ; fi
src/CMakeLists.txt
View file @
d291350f
#*******************************************************************************
# Copyright (c) 2015 logi.cals GmbH
#
#
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# and Eclipse Distribution License v1.0 which accompany this distribution.
#
# The Eclipse Public License is available at
# and Eclipse Distribution License v1.0 which accompany this distribution.
#
# The Eclipse Public License is available at
# http://www.eclipse.org/legal/epl-v10.html
# and the Eclipse Distribution License is available at
# and the Eclipse Distribution License is available at
# http://www.eclipse.org/org/documents/edl-v10.php.
#
#
# Contributors:
# Rainer Poisel - initial version
#*******************************************************************************/
...
...
@@ -56,7 +56,7 @@ ENDIF()
ADD_EXECUTABLE
(
MQTTVersion MQTTVersion.c
)
ADD_LIBRARY
(
paho-mqtt3c SHARED
${
common_src
}
MQTTClient.c
)
ADD_LIBRARY
(
paho-mqtt3a SHARED
${
common_src
}
MQTTAsync.c
)
TARGET_LINK_LIBRARIES
(
paho-mqtt3c pthread
${
LIBS_SYSTEM
}
)
TARGET_LINK_LIBRARIES
(
paho-mqtt3c pthread
${
LIBS_SYSTEM
}
)
TARGET_LINK_LIBRARIES
(
paho-mqtt3a pthread
${
LIBS_SYSTEM
}
)
TARGET_LINK_LIBRARIES
(
MQTTVersion paho-mqtt3a paho-mqtt3c
${
LIBS_SYSTEM
}
)
SET_TARGET_PROPERTIES
(
...
...
@@ -70,19 +70,33 @@ INSTALL(FILES MQTTAsync.h MQTTClient.h MQTTClientPersistence.h
DESTINATION include
)
IF
(
PAHO_WITH_SSL
)
SET
(
OPENSSL_LIB_SEARCH_PATH
""
CACHE PATH
"Directory containing OpenSSL libraries"
)
SET
(
OPENSSL_LIB_SEARCH_PATH
""
CACHE PATH
"Directory containing OpenSSL libraries"
)
SET
(
OPENSSL_INC_SEARCH_PATH
""
CACHE PATH
"Directory containing OpenSSL includes"
)
SET
(
OPENSSL_LIBRARIES ssl crypto
)
LINK_DIRECTORIES
(
${
OPENSSL_LIB_SEARCH_PATH
}
)
IF
(
${
CMAKE_SYSTEM_NAME
}
STREQUAL
"Darwin"
)
SET
(
OPENSSL_BREW_PATH
"/usr/local/opt/openssl"
)
ENDIF
(
${
CMAKE_SYSTEM_NAME
}
STREQUAL
"Darwin"
)
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_BREW_PATH
}
/lib
${
OPENSSL_DIR
}
/lib
${
OPENSSL_DIR
}
/lib64
)
FIND_LIBRARY
(
OPENSSLCRYPTO_LIB NAMES ssl libssl
HINTS
${
OPENSSL_BREW_PATH
}
/lib
${
OPENSSL_DIR
}
/lib
${
OPENSSL_DIR
}
/lib64
)
MESSAGE
(
STATUS
"OpenSSL hint
${
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
}
"
)
INCLUDE_DIRECTORIES
(
${
OPENSSL_INC
_SEARCH_PATH
}
)
${
OPENSSL_INC
LUDE_DIR
}
)
ADD_LIBRARY
(
paho-mqtt3cs SHARED
${
common_src
}
MQTTClient.c SSLSocket.c
)
ADD_LIBRARY
(
paho-mqtt3as SHARED
${
common_src
}
MQTTAsync.c SSLSocket.c
)
TARGET_LINK_LIBRARIES
(
paho-mqtt3cs pthread
${
OPENSSL_LIBRARIES
}
${
LIBS_SYSTEM
}
)
TARGET_LINK_LIBRARIES
(
paho-mqtt3as pthread
${
OPENSSL_LIBRARIES
}
${
LIBS_SYSTEM
}
)
TARGET_LINK_LIBRARIES
(
paho-mqtt3cs pthread
${
OPENSSL_LIB
}
${
OPENSSLCRYPTO_LIB
}
${
LIBS_SYSTEM
}
)
TARGET_LINK_LIBRARIES
(
paho-mqtt3as pthread
${
OPENSSL_LIB
}
${
OPENSSLCRYPTO_LIB
}
${
LIBS_SYSTEM
}
)
SET_TARGET_PROPERTIES
(
paho-mqtt3cs paho-mqtt3as PROPERTIES
VERSION
${
CLIENT_VERSION
}
...
...
@@ -95,4 +109,3 @@ IF (PAHO_WITH_SSL)
RUNTIME DESTINATION bin
LIBRARY DESTINATION lib
)
ENDIF
()
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