Opened 20 months ago

Closed 20 months ago

Last modified 20 months ago

#9881 closed enhancement (wontfix)

[feature] Support CMake build system.

Reported by: Haowei Hsu Owned by:
Priority: normal Component: build system
Version: git-master Keywords: cmake
Cc: Haowei Hsu Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Since CMake is the most popular build system of C/C++, I would expect that FFmpeg can support using CMake to compile the source code. Moreover, I hope that CMake can provide Config files for find_package() and Imported Targets.

Normally, there would be the following files generated for find_package() in Config Mode:

  • ffmpeg-config.cmake
  • ffmpeg-config-version.cmake
  • ffmpeg-targets.cmake
  • ffmpeg-targets-[debug|release].cmake

As for Imported Targets, consider FFmpeg has several components, I suggest that it take Qt or Poco for reference, providing the following Component Imported Targets with the namespace ffmpeg:::

  • ffmpeg::avcodec
  • ffmpeg::avformat
  • ffmpeg::avfilter
  • ffmpeg::avdevice
  • ffmpeg::avutil
  • ffmpeg::swscale
  • ffmpeg::swresample
  • ffmpeg::postproc

Change History (7)

comment:1 by Elon Musk, 20 months ago

Resolution: wontfix
Status: newclosed

in reply to:  1 comment:2 by Haowei Hsu, 20 months ago

Replying to Elon Musk:

Why not support using CMake to build the FFmpeg project? Does it have some obstacles?

It seems that CMake is more convenient to compile the Cross-Platform projects.

If there are some obstacles indeed, then I suggest to provide some CMake-specific Config Files for find_package() at least.

comment:3 by Haowei Hsu, 20 months ago

Summary: Support CMake build system.[feature] Support CMake build system.

comment:4 by Balling, 20 months ago

Cmake is extra dependency. Why does linux kernel not do it? Same here.

It does not matter anyway, ffmpeg really requires a big framework to comfortably check everything out and compile all together.

Last edited 20 months ago by Balling (previous) (diff)

in reply to:  4 comment:5 by Haowei Hsu, 20 months ago

Replying to Balling:

Cmake is extra dependency. Why does linux kernel not do it? Same here.

It does not matter anyway, ffmpeg really requires a big framework to comfortably check everything out and compile all together.

What does it matter with "linux kernel"? What do you mean "big framework"?

I was thinking that since lots of C/C++ libraries use CMake as their build system, it is better for FFmpeg to do so, as well. Besides, using CMake to build projects is more convienient and easy-to-use in Windows.

comment:6 by Elon Musk, 20 months ago

Sorry, bunch of FFmpeg devs are not switching to cmake anytime soon.
Besides there are more important task to be done first.

comment:7 by Balling, 20 months ago

linux kernel (mainline, that is, no one uses it, everyone uses backports repo) https://github.com/torvalds/linux

big framework: https://github.com/rdp/ffmpeg-windows-build-helpers and many others.

Last edited 20 months ago by Balling (previous) (diff)
Note: See TracTickets for help on using tickets.