Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake fails with custom cmake modules OpenSSL #1571

Open
AndreReinhold opened this issue Jan 31, 2025 · 1 comment
Open

CMake fails with custom cmake modules OpenSSL #1571

AndreReinhold opened this issue Jan 31, 2025 · 1 comment
Labels

Comments

@AndreReinhold
Copy link

Describe the bug
CMake fails with paho.mqttp.cpp 1.5.0 in my project because I am using a custom project based OpenSSL library for an embedded software that is found via a custom FindOpenSSL.cmake in my top level subdirectory cmake/modules/FindOpenSSL.cmake.

To Reproduce
With commit 9a4fd08 the CMAKE_MODULE_PATH gets overwritten by
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules")

So my top-level modification of CMAKE_MODULE_PATH is getting overwritten that I set with
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules")

Expected behavior
CMakeLists.txt should not set CMAKE_MODULE_PATH, but only append.

Log files
CMake Error at C:/software/CMake/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find OpenSSL, try to set the path to OpenSSL root folder in the
Call Stack (most recent call first):
C:/software/CMake/share/cmake-3.24/Modules/FindPackageHandleStandardArgs.cmake:594 (_FPHSA_FAILURE_MESSAGE)
C:/software/CMake/share/cmake-3.24/Modules/FindOpenSSL.cmake:599 (find_package_handle_standard_args)
3rdParty/paho.mqtt.cpp/externals/paho-mqtt-c/src/CMakeLists.txt:238 (find_package)

@icraggs icraggs added the build label Feb 11, 2025
@icraggs
Copy link
Contributor

icraggs commented Feb 11, 2025

@fpagliughi - have you seen this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants