Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Christian Butz
VTK
Commits
28bd9163
Commit
28bd9163
authored
Mar 24, 2010
by
Dave Partyka
Browse files
COMP: further fixes to get FFMPEG to be found properly on Linux.
parent
83219c38
Changes
2
Hide whitespace changes
Inline
Side-by-side
CMake/FindFFMPEG.cmake
View file @
28bd9163
...
...
@@ -12,7 +12,7 @@
# if needed to FFMPEG_LIBRARIES if ffmpeg ever changes...
# if ffmpeg headers are all in one directory
FIND_PATH
(
FFMPEG_INCLUDE_DIR
ffmpeg/
avformat.h
FIND_PATH
(
FFMPEG_INCLUDE_DIR avformat.h
PATHS
$ENV{FFMPEG_DIR}/include
$ENV{OSGDIR}/include
...
...
@@ -26,11 +26,10 @@ FIND_PATH(FFMPEG_INCLUDE_DIR ffmpeg/avformat.h
/opt/csw/include
# Blastwave
/opt/include
/usr/freeware/include
PATH_SUFFIXES ffmpeg
DOC
"Location of FFMPEG Headers"
)
message
(
"FFMPEG_INCLUDE_DIR:
${
FFMPEG_INCLUDE_DIR
}
"
)
# if ffmpeg headers are seperated to each of libavformat, libavcodec etc..
IF
(
NOT FFMPEG_INCLUDE_DIR
)
FIND_PATH
(
FFMPEG_INCLUDE_DIR libavformat/avformat.h
...
...
@@ -51,10 +50,11 @@ IF( NOT FFMPEG_INCLUDE_DIR )
DOC
"Location of FFMPEG Headers"
)
message
(
"FFMPEG_INCLUDE_DIR:
${
FFMPEG_INCLUDE_DIR
}
"
)
ENDIF
(
NOT FFMPEG_INCLUDE_DIR
)
# we want the -I include line to use the parent directory of ffmpeg as
# ffmpeg uses relative includes such as <ffmpeg/avformat.h> or <libavcodec/avformat.h>
get_filename_component
(
FFMPEG_INCLUDE_DIR
${
FFMPEG_INCLUDE_DIR
}
PATH
)
FIND_LIBRARY
(
FFMPEG_avformat_LIBRARY avformat
/usr/local/lib
...
...
CMake/vtkTestFFMPEG.cmake
View file @
28bd9163
...
...
@@ -28,21 +28,22 @@ IF (FFMPEG_INCLUDE_DIR)
"-DLINK_LIBRARIES:STRING=
${
FFMPEG_avcodec_LIBRARY
}
"
-DCOMPILE_DEFINITIONS:STRING=-D
${
VTK_FFMPEG_CDEFS
}
OUTPUT_VARIABLE OUTPUT
)
IF
(
VTK_FFMPEG_HAS_IMG_CONVERT
)
MESSAGE
(
STATUS
"Checking if FFMPEG has img_convert - found"
)
FILE
(
APPEND
${
CMAKE_BINARY_DIR
}${
CMAKE_FILES_DIRECTORY
}
/CMakeOutput.log
"Checking if FFMPEG has img_convert (passed):
\n
"
"
${
OUTPUT
}
\n\n
"
)
ELSE
(
VTK_FFMPEG_HAS_IMG_CONVERT
)
MESSAGE
(
STATUS
"Checking if FFMPEG has img_convert - not found"
)
FILE
(
APPEND
${
CMAKE_BINARY_DIR
}${
CMAKE_FILES_DIRECTORY
}
/CMakeError.log
"Checking if FFMPEG has img_convert (failed):
\n
"
"
${
OUTPUT
}
\n\n
"
)
ENDIF
(
VTK_FFMPEG_HAS_IMG_CONVERT
)
IF
(
VTK_FFMPEG_HAS_IMG_CONVERT
)
MESSAGE
(
STATUS
"Checking if FFMPEG has img_convert - found"
)
FILE
(
APPEND
${
CMAKE_BINARY_DIR
}${
CMAKE_FILES_DIRECTORY
}
/CMakeOutput.log
"Checking if FFMPEG has img_convert (passed):
\n
"
"
${
OUTPUT
}
\n\n
"
)
ELSE
(
VTK_FFMPEG_HAS_IMG_CONVERT
)
MESSAGE
(
STATUS
"Checking if FFMPEG has img_convert - not found"
)
FILE
(
APPEND
${
CMAKE_BINARY_DIR
}${
CMAKE_FILES_DIRECTORY
}
/CMakeError.log
"Checking if FFMPEG has img_convert (failed):
\n
"
"
${
OUTPUT
}
\n\n
"
)
ENDIF
(
VTK_FFMPEG_HAS_IMG_CONVERT
)
ENDIF
(
FFMPEG_avcodec_LIBRARY
)
SET
(
VTK_FFMPEG_CACHED_AVCODEC
${
FFMPEG_avcodec_LIBRARY
}
CACHE INTERNAL
"Previous value of FFMPEG_avcodec_LIBRARY"
FORCE
)
ENDIF
(
"VTK_FFMPEG_HAS_IMG_CONVERT"
MATCHES
"^VTK_FFMPEG_HAS_IMG_CONVERT$"
OR NOT
"VTK_FFMPEG_CACHED_AVCODEC"
MATCHES
"^
${
FFMPEG_avcodec_LIBRARY
}
$"
)
SET
(
VTK_FFMPEG_OLD_URL_FCLOSE
"VTK_FFMPEG_OLD_URL_FCLOSE"
)
IF
(
"VTK_FFMPEG_OLD_URL_FCLOSE"
MATCHES
"^VTK_FFMPEG_OLD_URL_FCLOSE$"
OR NOT
"VTK_FFMPEG_CACHED_AVFORMAT"
MATCHES
"^
${
FFMPEG_avformat_LIBRARY
}
$"
)
IF
(
VTK_FFMPEG_HAS_OLD_HEADER
)
SET
(
VTK_FFMPEG_CDEFS
"HAS_OLD_HEADER"
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment