From 67d6447b77f72fd3d21afaa5b0263a600e2a75ed Mon Sep 17 00:00:00 2001 From: fpagliughi Date: Fri, 19 Jul 2024 23:03:24 -0400 Subject: [PATCH 1/2] Removed the reset of the xxxSSL_ROOT_DIR variables, and cleaned output --- src/CMakeLists.txt | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index ed3af8c8..3fc669ba 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -228,20 +228,15 @@ install( if(PAHO_WITH_SSL OR PAHO_WITH_LIBRESSL) if(PAHO_WITH_LIBRESSL) - set(LIBRESSL_ROOT_DIR "" CACHE PATH "Directory containing LibreSSL libraries and includes") find_package(LibreSSL REQUIRED) - set(SSL_INCLUDE_DIR ${LIBRESSL_INCLUDE_DIR} CACHE PATH "Directory containing SSL includes") - set(SSL_LIBRARY_NAME LibreSSL CACHE STRING "Name of the used SSL library") - set(SSL_ROOT_DIR ${LIBRESSL_ROOT_DIR} CACHE PATH "Directory containing SSL libraries and includes") + set(SSL_LIBRARY_NAME LibreSSL) + message(STATUS "Using LibreSSL with headers at ${LIBRESSL_INCLUDE_DIR}, lib ${LIBRESSL_SSL_LIBRARY}") else() - set(OPENSSL_ROOT_DIR "" CACHE PATH "Directory containing OpenSSL libraries and includes") find_package(OpenSSL REQUIRED) - set(SSL_INCLUDE_DIR ${OPENSSL_INCLUDE_DIR} CACHE PATH "Directory containing SSL includes") - set(SSL_LIBRARY_NAME OpenSSL CACHE STRING "Name of the used SSL library") - set(SSL_ROOT_DIR ${OPENSSL_ROOT_DIR} CACHE PATH "Directory containing SSL libraries and includes") + set(SSL_LIBRARY_NAME OpenSSL) + message(STATUS "Using OpenSSL with headers at ${OPENSSL_INCLUDE_DIR}, lib ${OPENSSL_SSL_LIBRARY}") endif() - message("Use ${SSL_LIBRARY_NAME} at ${SSL_ROOT_DIR}") - message("SSL_INCLUDE_DIR: ${SSL_INCLUDE_DIR} ${LIBRESSL_SSL_LIBRARY} ${LIBRESSL_CRYPTO_LIBRARY}") + if(PAHO_BUILD_SHARED) ## common compilation for libpaho-mqtt3cs and libpaho-mqtt3as From 090af3480a75dbdc077f44ee2c2bdae8efcc3480 Mon Sep 17 00:00:00 2001 From: fpagliughi Date: Sat, 20 Jul 2024 10:22:45 -0400 Subject: [PATCH 2/2] CMake includes grabbed from project-relative path. --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 86f1f7f1..b96eccb7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,8 +25,8 @@ project("Eclipse Paho C" message(STATUS "CMake version: " ${CMAKE_VERSION}) message(STATUS "CMake system name: " ${CMAKE_SYSTEM_NAME}) -set(CMAKE_SCRIPTS "${CMAKE_SOURCE_DIR}/cmake") -set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake/modules") +set(CMAKE_SCRIPTS "${PROJECT_SOURCE_DIR}/cmake") +set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules") ## Project Version ## Previously we read in the version from these files, but now we use the