libobs: Fix cmake bug (make sure variable exists)

If the FFMPEG_AVCODEC_LIBRARIES variable does not exist, it will
generate a cmake error, so check to make sure the variable exists before
executing this code.
This commit is contained in:
jp9000
2015-09-13 11:29:28 -07:00
parent b266b563fa
commit df14671d2f

View File

@@ -7,7 +7,9 @@ find_package(FFmpeg REQUIRED
OPTIONAL_COMPONENTS avcodec)
include_directories(${FFMPEG_INCLUDE_DIRS})
list(REMOVE_ITEM FFMPEG_LIBRARIES ${FFMPEG_AVCODEC_LIBRARIES})
if (NOT "${FFMPEG_AVCODEC_LIBRARIES}" STREQUAL "")
list(REMOVE_ITEM FFMPEG_LIBRARIES ${FFMPEG_AVCODEC_LIBRARIES})
endif()
if(UNIX)
find_package(DBus QUIET)