Skip to content

Commit

Permalink
[cmake] ffmpeg: build parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
wsnipex authored and FernetMenta committed Sep 17, 2015
1 parent 9cc6330 commit 0726bff
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion tools/depends/target/ffmpeg/CMakeLists.txt
Expand Up @@ -17,6 +17,12 @@ if(GNUTLS_FOUND)
list(APPEND ffmpeg_conf --enable-gnutls)
endif()

include(ProcessorCount)
ProcessorCount(N)
if(NOT N EQUAL 0)
set(PARALLEL_FLAGS -j${N})
endif()

include(ExternalProject)
externalproject_add(ffmpeg
SOURCE_DIR ${CMAKE_SOURCE_DIR}
Expand Down Expand Up @@ -53,7 +59,7 @@ externalproject_add(ffmpeg
--cc=${CMAKE_C_COMPILER}
--prefix=${CMAKE_INSTALL_PREFIX}
${ffmpeg_conf}
BUILD_COMMAND make)
BUILD_COMMAND make ${PARALLEL_FLAGS})

install(CODE "Message(Done)")

Expand Down

0 comments on commit 0726bff

Please sign in to comment.