openvr icon indicating copy to clipboard operation
openvr copied to clipboard

Add ability to build with system installed jsoncpp

Open lubosz opened this issue 6 years ago • 2 comments

This first patch in this patch set adds the build option USE_SYSTEM_JSONCPP, which instead of using the internal version of jsoncpp.cpp links to a system installed one.

Even though I didn't need the second patch to make it work for me, it removes the local json.h from the CMake include path, which could cause problems on certain systems when building with USE_SYSTEM_JSONCPP. The second patch moves jsoncpp to a thirdparty directory and includes it when the system version should not be used.

This is an attempt to solve https://github.com/ValveSoftware/openvr/issues/1176 in a upstreamable fashion, keeping the previous behavior when the build flag is not set.

The problem was discovered during the packaging process of xrdesktop for Debian. This patch set will enable conformance with the Debian policy "embedded-library", as seen in https://lintian.debian.org/tags/embedded-library.html

I was able to build the examples (after applying https://github.com/ValveSoftware/openvr/pull/1177), as well as run xrdesktop in a system wide installation with these patches.

lubosz avatar Aug 15 '19 14:08 lubosz

@lubosz Could you rebase this PR on current master? Else I will just open an updated one.

ArchangeGabriel avatar Dec 23 '22 01:12 ArchangeGabriel

Rebased: #1716.

ArchangeGabriel avatar Jan 09 '23 18:01 ArchangeGabriel