diff options
author | Wolfgang Schupp <w.schupp@a1.net> | 2020-09-09 07:14:48 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-09 07:14:48 +0200 |
commit | b3a6f233667d27cf393523d46d58603ccc4d6f72 (patch) | |
tree | 0c2c2b171c691360322f2d88f2bed8f56296070e /tools | |
parent | 41546e6ec5cf5405bdf3845638e1730a6e824962 (diff) | |
parent | 807a9ef70e4f8a47f62dd6a600d076b6f90b0e14 (diff) |
Merge pull request #18382 from wsnipex/ninja-parallel
[cmake] allow ffmpeg and libdvd to build in parallel when using ninja
Diffstat (limited to 'tools')
-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)") |