diff options
author | wsnipex <wsnipex@a1.net> | 2020-05-09 11:27:08 +0200 |
---|---|---|
committer | wsnipex <wsnipex@a1.net> | 2020-09-07 15:03:07 +0200 |
commit | 807a9ef70e4f8a47f62dd6a600d076b6f90b0e14 (patch) | |
tree | dd7d071b0aca9c12dd047e21f9bbf329811bc592 /tools/depends/target/ffmpeg | |
parent | 0f186b7f53e24a3ec914741b146a161b5fcec0e9 (diff) |
[cmake] allow ffmpeg and libdvd to build in parallel when using ninja
Diffstat (limited to 'tools/depends/target/ffmpeg')
-rw-r--r-- | tools/depends/target/ffmpeg/CMakeLists.txt | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/tools/depends/target/ffmpeg/CMakeLists.txt b/tools/depends/target/ffmpeg/CMakeLists.txt index 3ebd65cf13..ac27049cdb 100644 --- a/tools/depends/target/ffmpeg/CMakeLists.txt +++ b/tools/depends/target/ffmpeg/CMakeLists.txt @@ -99,6 +99,16 @@ endif() message(STATUS "FFMPEG_CONF: ${ffmpeg_conf}") +set(MAKE_COMMAND $(MAKE)) +if(CMAKE_GENERATOR STREQUAL Ninja) + set(MAKE_COMMAND make) + include(ProcessorCount) + ProcessorCount(N) + if(NOT N EQUAL 0) + set(MAKE_COMMAND make -j${N}) + endif() +endif() + include(ExternalProject) externalproject_add(ffmpeg SOURCE_DIR ${CMAKE_SOURCE_DIR} @@ -124,7 +134,8 @@ externalproject_add(ffmpeg --enable-protocol=http --enable-encoder=png --enable-encoder=mjpeg - ${ffmpeg_conf}) + ${ffmpeg_conf} + BUILD_COMMAND ${MAKE_COMMAND}) install(CODE "Message(Done)") |