-
Notifications
You must be signed in to change notification settings - Fork 220
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fallback to old FindFFMpeg script when pkg-config fails.
This should work better on Windows, hopefully. It worked well enough when I intentionally broke pkg-config, anyway.
- Loading branch information
Showing
2 changed files
with
37 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# - Find libavcodec (FFMPEG) | ||
# Find the native FFMPEG headers and libraries. | ||
# Only grabs what Lightspark needs currently | ||
# | ||
# FFMPEG_INCLUDE_DIRS - where to find avcodec.h | ||
# FFMPEG_LIBRARIES - List of libraries when using ffmpeg | ||
# FFMPEG_FOUND - True if ffmpeg found. | ||
|
||
# Look for the header file. | ||
FIND_PATH(FFMPEG_INCLUDE_DIR NAMES libavcodec/avcodec.h PATH_SUFFIXES ffmpeg) | ||
MARK_AS_ADVANCED(FFMPEG_INCLUDE_DIR) | ||
|
||
# Look for the library. | ||
FIND_LIBRARY(FFMPEG_AVCODEC_LIBRARY NAMES | ||
avcodec | ||
) | ||
|
||
FIND_LIBRARY(FFMPEG_AVUTIL_LIBRARY NAMES | ||
avutil | ||
) | ||
|
||
SET(FFMPEG_LIBRARY ${FFMPEG_AVCODEC_LIBRARY} ${FFMPEG_AVUTIL_LIBRARY}) | ||
MARK_AS_ADVANCED(FFMPEG_LIBRARY) | ||
|
||
# handle the QUIETLY and REQUIRED arguments and set FFMPEG_FOUND to TRUE if | ||
# all listed variables are TRUE | ||
INCLUDE(FindPackageHandleStandardArgs) | ||
FIND_PACKAGE_HANDLE_STANDARD_ARGS(FFMPEG DEFAULT_MSG FFMPEG_LIBRARY FFMPEG_INCLUDE_DIR) | ||
|
||
IF(FFMPEG_FOUND) | ||
SET(FFMPEG_LIBRARIES ${FFMPEG_LIBRARY}) | ||
SET(FFMPEG_INCLUDE_DIRS ${FFMPEG_INCLUDE_DIR}) | ||
ENDIF(FFMPEG_FOUND) |