Can not build the Live Link C++ project or any the tutorial examples using CMake

Hello,

I have installed the perquisite software and SDK’s but it appears when using CMake, the list file included with these projects features content which is depreciated.

Could you confirm this is the case and possibly update the tutorial samples and any of your tools that utilise CMake?

Here is the error when attempting to build the Hello ZED tutorial project:

CMake Deprecation Warning at CMakeLists.txt:1 (CMAKE_MINIMUM_REQUIRED):
Compatibility with CMake < 3.10 will be removed from a future version of
CMake.

Update the VERSION argument value. Or, use the … syntax
to tell CMake that the project requires at least but has been updated
to work with policies introduced by or earlier.

Selecting Windows SDK version 10.0.22621.0 to target Windows 10.0.26100.
CMake Error at CMakeLists.txt:5 (cmake_policy):
Policy CMP0003 may not be set to OLD behavior because this version of CMake
no longer supports it. The policy was introduced in CMake version 2.6.0,
and use of NEW behavior is now required.

Please either update your CMakeLists.txt files to conform to the new
behavior or use an older version of CMake that still supports the old
behavior. Run cmake --help-policy CMP0003 for more information.

Hi,

Can you share your CMake version please?

Stereolabs Support

Sure thing… i’m using the latest version: CMake 4.1.0-rc1

I was not able to reproduce your issue, which sample did you try to build exactly?

Stereolabs Support

Any of the tutorial example projects, I started with the ‘hello zed’.

For some reason, I can’t reproduce the issue on my side.

For now, I recommend switching to an older CMake version (< 4.0, I believe).

Anyway, thanks for the feedback, we’ll take a closer look at this and fix it in a future version.

Best,

Thanks… I’m getting the same error even with 3.5 and 3.31.8.

Don’t feel comfortable downloading anything older than that.

Is there anything you could think of which might cause CMake to report an error like this?

I am not a developer, I’m a technical artist so my experience of low level solutions like this is minimal.

Is there any other way I can get access to a sender that will allow me to use my Zed Camera in UE with LiveLink?

That’s quite unexpected. I feel like I’m missing something.

Could you please tell me which SDK version you are using, and also share the CMakelist you used to generate this issue?

Thanks

Sure:

SDK 5.0.3

Everything with that is working fine. The diagnostic and depth viewer apps work as expected. I also have the camera working fine with the example UE project.

I can’t upload files directly so here it is on Google Drive: CMakeLists - Google Docs

Thanks. It looks like you are trying to build one of the C tutorials, not C++, is that intentional?

You should not have the issue when building the live link samples.

Apologies, i uploaded the wrong file. I just tried again with the cpp CMake with version 3.5 and I only got a warning this time, not an error:

CMake Warning (dev) at CMakeLists.txt:14 (find_package):
Policy CMP0146 is not set: The FindCUDA module is removed. Run “cmake
–help-policy CMP0146” for policy details. Use the cmake_policy command to
set the policy and suppress this warning.

Is this going to be an issue?

No, it’s fine, you should be able to build the app.

Thank you. I’ll try this and try building the LiveLink sample.