CasparCG / server

CasparCG Server is a Windows and Linux software used to play out professional graphics, audio and video to multiple outputs. It has been in 24/7 broadcast production since 2006. Ready-to-use downloads are available under the Releases tab https://casparcg.com.
GNU General Public License v3.0
915 stars 269 forks source link

Add FindCEF module & use it for Linux system builds #1556

Closed dimitry-ishenko closed 2 months ago

dimitry-ishenko commented 2 months ago

@Julusian I was thinking of using FindCEF for manually fetched version of libcef as well, but this is a bit tricky since CEF doesn't get pulled/extracted until the compile stage. This can partially be worked around by replacing ExternalProject_Add() with FetchContent_Declare()/FetchContent_MakeAvailable(), which will make libcef.so and the headers available for FindCEF, but it still leaves libcef_dll_wrapper.so that needs to be built... Any thoughts?

dimitry-ishenko commented 2 months ago

Another option would be to patch CEF itself and make it export targets that can be pulled in by the Server, whether it's manually-built or provided by the system. This might be a better version. You are already patching it anyway. And I can apply the patch to my CEF packages as well.

BTW, if you are interested, I have CEF packages in my PPA here: https://launchpad.net/~ppa-verse/+archive/ubuntu/casparcg

Julusian commented 2 months ago

I don't have strong feelings on this really, just that I find the Find* scripts a bit annoying. Partly because they don't work with dependencies pulled in through ExternalProject_Add, and partly because you have to bring your own if cmake doesn't bundle it, and then maintain that. (eg #1522 #1418) When doing this cmake rework, I removed the FindBoost for a similar reason, but for that we can at least assume that there will be one already on the system (on linux, windows does it manually).

So I am fine with it being done differently when using system vs downloaded version of the library.

I see you have already found my ppa, the packaging is probably not as properly done as yours, but it works well enough. I shall take a look at what you've done for inspiration

dimitry-ishenko commented 2 months ago

OK yeah. CMake people seem to agree (as far as not liking the FindXXX scripts) and suggest that packages should export their own config files. I am going to try to patch the CEF package and make it install the config file. This way it should play nicely with both fetched and installed version.

I see you have already found my ppa, the packaging is probably not as properly done as yours, but it works well enough. I shall take a look at what you've done for inspiration

If you care to give me access to your PPA, I can push my package there. Or, you can just grab mine here:

https://github.com/dimitry-ishenko-casparcg/chromium-embedded-117

and push it yourself. NB: I am using split tarballs to build for amd64, arm64 and armhf, which you probably don't care about.

dimitry-ishenko commented 2 months ago

@Julusian I've added build instructions to my repo so you can re-create the package and upload to yours.

Or, if you want, I can be the maintainer for the Debian packages.

I am planning to integrate my CEF patches with the Server, which should help simplify the build system a bit. I will also try to do some work on the build system as discussed in #1489. So, expect some PRs from me shortly. 😅

dimitry-ishenko commented 2 months ago

Closing this in favor of #1557