Skip to content

cmake: fix confusing error when a dependency is undetected in curl-config.cmake#20737

Closed
vszakats wants to merge 1 commit intocurl:masterfrom
vszakats:cmconfigdetmiss
Closed

cmake: fix confusing error when a dependency is undetected in curl-config.cmake#20737
vszakats wants to merge 1 commit intocurl:masterfrom
vszakats:cmconfigdetmiss

Conversation

@vszakats
Copy link
Member

@vszakats vszakats commented Feb 26, 2026

Fixing:

CMake Error at /path/to/CURL/CURLConfig.cmake:190 (get_target_property):
  get_target_property() called with non-existent target "CURL::libssh2".

and replacing it with the clearer message:

CMake Error at /path/to/CURL/CURLTargets.cmake:61 (set_target_properties):
  The link interface of target "CURL::libcurl_static" contains:

    CURL::libssh2

  but the target was not found.  Possible reasons include:
[...]

Reported-by: Val S.
Ref: #20729
Follow-up to 16f073e #16973


https://github.com/curl/curl/pull/20737/files?w=1

@vszakats vszakats added the cmake label Feb 26, 2026
@github-actions github-actions bot added the build label Feb 26, 2026
@vszakats vszakats changed the title cmake: try improve error message when dependency is undetected in curl-config.cmake cmake: fix confusing error when a dependency is undetected in curl-config.cmake Feb 26, 2026
@vszakats vszakats closed this in fb58b23 Feb 26, 2026
@vszakats vszakats deleted the cmconfigdetmiss branch February 26, 2026 18:45
@vszakats
Copy link
Member Author

vszakats commented Feb 26, 2026

Maybe useful information that this bug happened in compatibility
code specifically written for old cmake versions, and planned to be
dropped via #20407.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

1 participant