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
eb294bd1
Commit
eb294bd1
authored
Jan 16, 2017
by
Otavio Rodolfo Piske
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use CMake features to search for OpenSSL libraries
Signed-off-by:
Otavio Rodolfo Piske
<
opiske@redhat.com
>
parent
83cc318c
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
15 deletions
+26
-15
CMakeLists.txt
src/CMakeLists.txt
+26
-15
No files found.
src/CMakeLists.txt
View file @
eb294bd1
...
...
@@ -70,19 +70,30 @@ 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
}
)
find_path
(
OPENSSL_INCLUDE_DIR openssl/ssl.h
HINTS
${
OPENSSL_INC_SEARCH_PATH
}
/include
)
find_library
(
OPENSSL_LIB NAMES ssl libssl
HINTS
${
OPENSSL_DIR
}
/lib
${
OPENSSL_DIR
}
/lib64
)
find_library
(
OPENSSLCRYPTO_LIB NAMES ssl libssl
HINTS
${
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
}
...
...
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