[build] add option to use externally build LZ4 library - #13803
Conversation
|
Can one of the admins verify this patch? |
|
HI @RobbertProost , Looks like a nice addition, and if it fix your issue it's great. Thanks for your contribution |
| $<$<NOT:$<BOOL:${USE_EXTERNAL_LZ4}>>:${LZ4_INCLUDE_PATH}> | ||
| ) | ||
|
|
||
| target_link_libraries(${PROJECT_NAME} PRIVATE |
There was a problem hiding this comment.
Why not wrapping this line with
if (USE_EXTERNAL_LZ4)
?
There was a problem hiding this comment.
No particular reason, apart from style. I personally like to use this form such that you can have a single target_link_libraries and a single target_include_directories. Now for this particular case, where we only need to link against one library when building, there is no added benifit of using the generator expression, but it keeps it consistent with the target_include_directories.
|
The vendored sources are still used by |
This PR adds a CMake option with which you can control if the SDK should be building its own version of LZ4 compression library or should use a prebuild library that can be found in the build environment.
This enables to use of a statically build RealSense SDK in combination with other statically build libraries that use LZ4.
Related issue #13796