Skip to content

CMake: fix CMAKE_MODULE_PATH extension declaration - #1648

Open
Roman3349 wants to merge 1 commit into
eclipse-paho:developfrom
Roman3349:fix/CMAKE_MODULE_PATH
Open

CMake: fix CMAKE_MODULE_PATH extension declaration#1648
Roman3349 wants to merge 1 commit into
eclipse-paho:developfrom
Roman3349:fix/CMAKE_MODULE_PATH

Conversation

@Roman3349

@Roman3349 Roman3349 commented Feb 25, 2026

Copy link
Copy Markdown
Contributor

Currently. rewriting the global CMake variable CMAKE_MODULE_PATH can break the build of parent CMake project in which paho.mqtt.c is included as a subproject.

Instead of set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules"), it should by used list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules") as stated in the CMake documentation.

This will eliminate the need for a patch for the conan package, see https://github.com/conan-io/conan-center-index/blob/9611e90bbad1c3cd274413c00d16aa2fd1df2833/recipes/paho-mqtt-c/all/conanfile.py#L83-L90.

@fpagliughi fpagliughi left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Roman3349
Roman3349 changed the base branch from master to develop March 3, 2026 19:35
@Roman3349
Roman3349 changed the base branch from develop to master March 3, 2026 19:36
Signed-off-by: Roman Ondráček <mail@romanondracek.cz>
@Roman3349
Roman3349 force-pushed the fix/CMAKE_MODULE_PATH branch from 225fbd9 to f7ee41b Compare March 8, 2026 14:19
@Roman3349
Roman3349 changed the base branch from master to develop March 8, 2026 14:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants