Skip to content

CMP0111 requires IMPORTED_LOCATION or IMPORTED_IMPLIB being set#1041

Merged
milyin merged 1 commit intoeclipse-zenoh:mainfrom
oleid:fix/CMP0111
Jun 30, 2025
Merged

CMP0111 requires IMPORTED_LOCATION or IMPORTED_IMPLIB being set#1041
milyin merged 1 commit intoeclipse-zenoh:mainfrom
oleid:fix/CMP0111

Conversation

@oleid
Copy link
Contributor

@oleid oleid commented Jun 25, 2025

When using zenohc via cmake's FetchContent mechanism,
I get the following warnings:

CMake Warning (dev) in build/_deps/zenohc-src/CMakeLists.txt:
  Policy CMP0111 is not set: An imported target missing its location property
  fails during generation.  Run "cmake --help-policy CMP0111" for policy
  details.  Use the cmake_policy command to set the policy and suppress this
  warning.

  IMPORTED_LOCATION or IMPORTED_IMPLIB not set for imported target
  "zenohc_shared".

and on linking,

ninja: error: 'zenohc_shared-NOTFOUND', needed by 'myexecutable', missing and no known rule to make it

Apparently, the IMPORTED_LOCATION is really needed ;)
This change sets the correct library and makes the linking work fine for me.

Please note: While a generator expression would be nicer, we sadly have to evaluate the expression at configure-time.

@github-actions
Copy link

PR missing one of the required labels: {'documentation', 'bug', 'internal', 'enhancement', 'new feature', 'breaking-change', 'dependencies'}

@github-actions
Copy link

PR missing one of the required labels: {'documentation', 'dependencies', 'bug', 'new feature', 'enhancement', 'breaking-change', 'internal'}

@DenisBiryukov91 DenisBiryukov91 added the bug Something isn't working label Jun 25, 2025
@oleid
Copy link
Contributor Author

oleid commented Jun 25, 2025

I fixed the typo fixing the cross-compilation and replaced the remaining release variants with a local variable as well.

The CI now fails with a timeout while resolving musl.cc. Any idea what to do about this?

Copy link
Member

@fuzzypixelz fuzzypixelz left a comment

Choose a reason for hiding this comment

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

Please sign the Eclipse Contributor Agreement.

@fuzzypixelz fuzzypixelz requested a review from milyin June 27, 2025 13:48
@oleid
Copy link
Contributor Author

oleid commented Jun 27, 2025

Please sign the Eclipse Contributor Agreement.

I did this already a few days ago, once the pipeline complained for the first time. As far as I can tell, the corresponding pipeline is fine since.

@milyin milyin merged commit 68936a0 into eclipse-zenoh:main Jun 30, 2025
23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants