forked from microsoft/vcpkg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request microsoft#6545 from JackBoosY/dev/jack/6543
[paho-mqtt]Fix install path.
- Loading branch information
Showing
4 changed files
with
155 additions
and
65 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
Source: paho-mqtt | ||
Version: 1.2.1 | ||
Version: 1.2.1-1 | ||
Description: Paho project provides open-source client implementations of MQTT and MQTT-SN messaging protocols aimed at new, existing, and emerging applications for the Internet of Things | ||
Build-Depends: openssl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
diff --git a/CMakeLists.txt b/CMakeLists.txt | ||
index 418e2f2..f05aad4 100644 | ||
--- a/CMakeLists.txt | ||
+++ b/CMakeLists.txt | ||
@@ -62,9 +62,9 @@ ENDIF() | ||
### packaging settings | ||
SET(CPACK_PACKAGE_VENDOR "Eclipse Paho") | ||
SET(CPACK_PACKAGE_NAME "Eclipse-Paho-MQTT-C") | ||
-INSTALL(FILES CONTRIBUTING.md epl-v10 edl-v10 README.md notice.html DESTINATION .) | ||
+INSTALL(FILES CONTRIBUTING.md epl-v10 edl-v10 README.md notice.html DESTINATION share/paho-mqtt) | ||
FILE(GLOB samples "src/samples/*.c") | ||
-INSTALL(FILES ${samples} DESTINATION samples) | ||
+INSTALL(FILES ${samples} DESTINATION share/paho-mqtt/samples) | ||
IF (WIN32) | ||
SET(CPACK_GENERATOR "ZIP") | ||
ELSEIF(PAHO_BUILD_DEB_PACKAGE) | ||
diff --git a/doc/CMakeLists.txt b/doc/CMakeLists.txt | ||
index 06e4c5d..9cf7c21 100644 | ||
--- a/doc/CMakeLists.txt | ||
+++ b/doc/CMakeLists.txt | ||
@@ -37,4 +37,4 @@ FOREACH(DOXYFILE_SRC DoxyfileV3ClientAPI;DoxyfileV3AsyncAPI;DoxyfileV3ClientInte | ||
SET(DOXYTARGETS ${DOXYTARGETS} ${DOXYFILE_SRC}.target) | ||
ENDFOREACH(DOXYFILE_SRC) | ||
ADD_CUSTOM_TARGET(doc ALL DEPENDS ${DOXYTARGETS}) | ||
-INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION share) | ||
+INSTALL(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doc DESTINATION share/paho-mqtt) | ||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
index c57185b..98c7f31 100644 | ||
--- a/src/CMakeLists.txt | ||
+++ b/src/CMakeLists.txt | ||
@@ -84,7 +84,7 @@ INSTALL(TARGETS paho-mqtt3c paho-mqtt3a | ||
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) | ||
INSTALL(TARGETS MQTTVersion | ||
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) | ||
+ RUNTIME DESTINATION tools/paho-mqtt) | ||
|
||
IF (PAHO_BUILD_STATIC) | ||
ADD_LIBRARY(paho-mqtt3c-static STATIC $<TARGET_OBJECTS:common_obj> MQTTClient.c) | ||
@@ -98,7 +98,7 @@ IF (PAHO_BUILD_STATIC) | ||
ENDIF() | ||
|
||
INSTALL(FILES MQTTAsync.h MQTTClient.h MQTTClientPersistence.h | ||
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}) | ||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/paho-mqtt) | ||
|
||
IF (PAHO_WITH_SSL) | ||
SET(OPENSSL_SEARCH_PATH "" CACHE PATH "Directory containing OpenSSL libraries and includes") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,97 @@ | ||
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt | ||
index 14b94b1..508c5b1 100644 | ||
--- a/src/CMakeLists.txt | ||
+++ b/src/CMakeLists.txt | ||
@@ -65,28 +65,29 @@ ENDIF() | ||
ADD_LIBRARY(common_obj OBJECT ${common_src}) | ||
SET_PROPERTY(TARGET common_obj PROPERTY POSITION_INDEPENDENT_CODE ON) | ||
|
||
-ADD_EXECUTABLE(MQTTVersion MQTTVersion.c) | ||
- | ||
-ADD_LIBRARY(paho-mqtt3c SHARED $<TARGET_OBJECTS:common_obj> MQTTClient.c) | ||
-ADD_LIBRARY(paho-mqtt3a SHARED $<TARGET_OBJECTS:common_obj> MQTTAsync.c) | ||
- | ||
-TARGET_LINK_LIBRARIES(paho-mqtt3c ${LIBS_SYSTEM}) | ||
-TARGET_LINK_LIBRARIES(paho-mqtt3a ${LIBS_SYSTEM}) | ||
- | ||
-TARGET_LINK_LIBRARIES(MQTTVersion paho-mqtt3a paho-mqtt3c ${LIBS_SYSTEM}) | ||
-SET_TARGET_PROPERTIES( | ||
- paho-mqtt3c paho-mqtt3a PROPERTIES | ||
- VERSION ${CLIENT_VERSION} | ||
- SOVERSION ${PAHO_VERSION_MAJOR}) | ||
- | ||
-INSTALL(TARGETS paho-mqtt3c paho-mqtt3a | ||
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) | ||
-INSTALL(TARGETS MQTTVersion | ||
- RUNTIME DESTINATION tools/paho-mqtt) | ||
- | ||
-IF (PAHO_BUILD_STATIC) | ||
+IF (NOT PAHO_BUILD_STATIC) | ||
+ ADD_EXECUTABLE(MQTTVersion MQTTVersion.c) | ||
+ | ||
+ ADD_LIBRARY(paho-mqtt3c SHARED $<TARGET_OBJECTS:common_obj> MQTTClient.c) | ||
+ ADD_LIBRARY(paho-mqtt3a SHARED $<TARGET_OBJECTS:common_obj> MQTTAsync.c) | ||
+ | ||
+ TARGET_LINK_LIBRARIES(paho-mqtt3c ${LIBS_SYSTEM}) | ||
+ TARGET_LINK_LIBRARIES(paho-mqtt3a ${LIBS_SYSTEM}) | ||
+ | ||
+ TARGET_LINK_LIBRARIES(MQTTVersion paho-mqtt3a paho-mqtt3c ${LIBS_SYSTEM}) | ||
+ SET_TARGET_PROPERTIES( | ||
+ paho-mqtt3c paho-mqtt3a PROPERTIES | ||
+ VERSION ${CLIENT_VERSION} | ||
+ SOVERSION ${PAHO_VERSION_MAJOR}) | ||
+ | ||
+ INSTALL(TARGETS paho-mqtt3c paho-mqtt3a | ||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) | ||
+ INSTALL(TARGETS MQTTVersion | ||
+ RUNTIME DESTINATION tools/paho-mqtt) | ||
+ELSE() | ||
+ message("Build as static library") | ||
ADD_LIBRARY(paho-mqtt3c-static STATIC $<TARGET_OBJECTS:common_obj> MQTTClient.c) | ||
ADD_LIBRARY(paho-mqtt3a-static STATIC $<TARGET_OBJECTS:common_obj> MQTTAsync.c) | ||
|
||
@@ -132,22 +133,24 @@ IF (PAHO_WITH_SSL) | ||
ADD_LIBRARY(common_ssl_obj OBJECT ${common_src}) | ||
SET_PROPERTY(TARGET common_ssl_obj PROPERTY POSITION_INDEPENDENT_CODE ON) | ||
SET_PROPERTY(TARGET common_ssl_obj PROPERTY COMPILE_DEFINITIONS "OPENSSL=1") | ||
- ADD_LIBRARY(paho-mqtt3cs SHARED $<TARGET_OBJECTS:common_ssl_obj> MQTTClient.c SSLSocket.c) | ||
- ADD_LIBRARY(paho-mqtt3as SHARED $<TARGET_OBJECTS:common_ssl_obj> MQTTAsync.c SSLSocket.c) | ||
- | ||
- TARGET_LINK_LIBRARIES(paho-mqtt3cs ${OPENSSL_LIB} ${OPENSSLCRYPTO_LIB} ${LIBS_SYSTEM}) | ||
- TARGET_LINK_LIBRARIES(paho-mqtt3as ${OPENSSL_LIB} ${OPENSSLCRYPTO_LIB} ${LIBS_SYSTEM}) | ||
- SET_TARGET_PROPERTIES( | ||
- paho-mqtt3cs paho-mqtt3as PROPERTIES | ||
- VERSION ${CLIENT_VERSION} | ||
- SOVERSION ${PAHO_VERSION_MAJOR} | ||
- COMPILE_DEFINITIONS "OPENSSL=1") | ||
- INSTALL(TARGETS paho-mqtt3cs paho-mqtt3as | ||
- ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
- LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
- RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) | ||
- | ||
- IF (PAHO_BUILD_STATIC) | ||
+ | ||
+ IF (NOT PAHO_BUILD_STATIC) | ||
+ ADD_LIBRARY(paho-mqtt3cs SHARED $<TARGET_OBJECTS:common_ssl_obj> MQTTClient.c SSLSocket.c) | ||
+ ADD_LIBRARY(paho-mqtt3as SHARED $<TARGET_OBJECTS:common_ssl_obj> MQTTAsync.c SSLSocket.c) | ||
+ | ||
+ TARGET_LINK_LIBRARIES(paho-mqtt3cs ${OPENSSL_LIB} ${OPENSSLCRYPTO_LIB} ${LIBS_SYSTEM}) | ||
+ TARGET_LINK_LIBRARIES(paho-mqtt3as ${OPENSSL_LIB} ${OPENSSLCRYPTO_LIB} ${LIBS_SYSTEM}) | ||
+ SET_TARGET_PROPERTIES( | ||
+ paho-mqtt3cs paho-mqtt3as PROPERTIES | ||
+ VERSION ${CLIENT_VERSION} | ||
+ SOVERSION ${PAHO_VERSION_MAJOR} | ||
+ COMPILE_DEFINITIONS "OPENSSL=1") | ||
+ INSTALL(TARGETS paho-mqtt3cs paho-mqtt3as | ||
+ ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
+ LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} | ||
+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}) | ||
+ ELSE() | ||
+ message("Build as static library") | ||
ADD_LIBRARY(paho-mqtt3cs-static STATIC $<TARGET_OBJECTS:common_ssl_obj> MQTTClient.c SSLSocket.c) | ||
ADD_LIBRARY(paho-mqtt3as-static STATIC $<TARGET_OBJECTS:common_ssl_obj> MQTTAsync.c SSLSocket.c) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters