shaka-project / shaka-packager

A media packaging and development framework for VOD and Live DASH and HLS applications, supporting Common Encryption for Widevine and other DRM Systems.
https://shaka-project.github.io/shaka-packager/
Other
2k stars 510 forks source link

How to integrate shaka-packager sdk to cmake based projects? #1263

Closed felibol closed 1 year ago

felibol commented 1 year ago

System info

Operating System: 18.04.5 LTS (Bionic Beaver) Shaka Packager Version: main branch cc9a691aef946dfb4d68077d3a741ef1b88d2f21

Question

I want to use shaka-packager at a c++ project as packager and just wonder what is the suggested way to add your sdk to cmake based project? Do you have any FindShakaPackager.cmake etc.

Thanks.

joeyparrish commented 1 year ago

We haven't yet finished the cmake port and merged the cmake branch back into main.

What we are doing in the cmake branch for third-party dependencies is using add_subdirectory to add each one to our build. These are git submodules within our repo:

https://github.com/shaka-project/shaka-packager/blob/8b87804c57c158ab5f66e8de522fb0cca852a444/packager/third_party/CMakeLists.txt#L29

Would a similar strategy work for you to include Shaka Packager?

Please try out the cmake branch and its libpackager target as you integrate. The only option right now is LIBPACKAGER_SHARED, to control the generation of a shared vs static library. And please let us know what we can change to make life easier for you. Thanks!

https://github.com/shaka-project/shaka-packager/blob/8b87804c57c158ab5f66e8de522fb0cca852a444/CMakeLists.txt#L19-L21

https://github.com/shaka-project/shaka-packager/blob/8b87804c57c158ab5f66e8de522fb0cca852a444/packager/CMakeLists.txt#L82-L87

github-actions[bot] commented 1 year ago

@felibol Does this answer all your questions? If so, would you please close the issue?

github-actions[bot] commented 1 year ago

Closing due to inactivity. If this is still an issue for you or if you have further questions, the OP can ask shaka-bot to reopen it by including @shaka-bot reopen in a comment.