librealsense icon indicating copy to clipboard operation
librealsense copied to clipboard

Improved support to build libraries in shared mode

Open rhabacker opened this issue 5 months ago • 6 comments

The changes from this pull request have been adopted by https://build.opensuse.org/package/show/home:rhabacker:branches:games/librealsense and add support for creating libraries in shared mode, which is required by Linux distributions such as openSUSE.

I did run pr_check.sh and api_check.sh under scripts.

rhabacker avatar Jul 09 '25 13:07 rhabacker

Can one of the admins verify this patch?

sysrsbuild avatar Jul 09 '25 13:07 sysrsbuild

  • The main library already follows BUILD_SHARED_LIBS.
  • I see no effort to handle the necessary export for MSVC.

dg0yt avatar Jul 15 '25 04:07 dg0yt

  • The main library already follows BUILD_SHARED_LIBS.

There was a spelling error in the commit message, thanks for pointing out.

* I see no effort to handle the necessary  export for MSVC.

The shared build support has been limited to unix like platforms.

rhabacker avatar Jul 15 '25 20:07 rhabacker

Support is currently limited to unix-like platforms and is required by packages on build.opensuse.org.

For the creation of packages with shared libraries on Linux distributions such as openSUSE, it should also be noted that third-party packages such as curl and nlohmann_json are included in separate packages, see for example https://build.opensuse.org/projects/hardware/packages/librealsense/files/0001-third-party-use-nlohmann_json-from-system.patch?expand=1

rhabacker avatar Jul 21 '25 09:07 rhabacker

Maybe it would be better to not put more topics in a single PR.

dg0yt avatar Jul 22 '25 10:07 dg0yt

Maybe it would be better to not put more topics in a single PR.

See https://github.com/IntelRealSense/librealsense/pull/14155

rhabacker avatar Jul 22 '25 12:07 rhabacker