Hi together, i worked on the ffmpeg.cmake script so that it worked
again (on my pc)
Do i need to add the libraries for including them for the linker?

Would be nice if someone could have a look on it.

Andreas

/trunk/KDE/multimedia/cmake/modules

2010/6/1 Alexander Neundorf <[email protected]>:
> Forwarding, so others can help too :-)
>
> Alex
>
> ----------  Forwarded Message  ----------
>
> Subject: Re: Fwd: Re: Update FindFFmpeg to find/search for libswscale
> Date: Tuesday 01 June 2010
> From: Andreas Scherf <[email protected]>
> To: [email protected]
>
> Hi Alexander,
> i changed some code inside the ffmpegthumbnailer and added the
> FindFFMPEG.cmake file.
> But it did not work as expected. Could you have a look at it?
>
> Andreas
>
> 2010/5/26 Alexander Neundorf <[email protected]>:
>> On Wednesday 26 May 2010, Andreas Scherf wrote:
>>> Am Mittwoch, 26. Mai 2010 schrieb Alexander Neundorf:
>>> > On Wednesday 26 May 2010, Andreas Scherf wrote:
>>> > > Hi Alexander,
>>> > > i want the best solution! A private copy is hard to maintain. I think a
>>> > > single solution for finding ffmpeg is the best solution.
>>> >
>>> > Please keep kde-buildsystem on CC.
>>>
>>> Ok, but i am not subscibed to this list ..
>>
>> That's no problem, other people responding can also keep you on CC.
>>
>>> > A private copy is to maintain, but it is a magnitude easier to maintain
>>> > than a shared, installed file.
>>> > An installed file needs to keep source compatibility for all of KDE 4.x.
>>> > A private copy doesn't have to care about source compatibility as long as
>>> > the project where it is used works.
>>>
>>> You are the expert for this. If you think, it is better to have a local
>>> copy inside kdemultimedia the it should be so. If not we should have one
>>> for kde. I'll accept your or any other decision.
>>
>> If you use the attached file as a private, not-installed copy inside
>> kdemultimedia this is fine with me.
>>
>> But I would also be happy if we try to improve the FindFFmpeg.cmake in
> kdelibs
>> so it does what you need. This file is quite straightforward and easy to
>> understand.
>> Adding support for finding libswscale to it doesn't look to hard.
>> If you have a look at the file, you'll see what to do.
>> Basically add find_path() and find_library() calls for the respective files.
>>
>> Alex
>>
>
> -------------------------------------------------------
>
# - Try to find FFMPEG
# Once done this will define
#  
#  FFMPEG_FOUND		 - system has FFMPEG
#  FFMPEG_INCLUDE_DIR	 - the include directories
#  FFMPEG_LIBRARY_DIR	 - the directory containing the libraries
#  FFMPEG_LIBRARIES	 - link these to use FFMPEG
#  FFMPEG_SWSCALE_FOUND	 - FFMPEG also has SWSCALE
#   

include(FindPackageHandleStandardArgs)

set( FFMPEG_HEADERS avformat.h avcodec.h avutil.h )
set( FFMPEG_PATH_SUFFIXES libavformat libavcodec libavutil )


if ( FFMPEG_LIBRARIES AND FFMPEG_INCLUDE_DIR)
    set (FFMPEG_FOUND TRUE)
endif ( FFMPEG_LIBRARIES AND FFMPEG_INCLUDE_DIR)

INCLUDE(FindPkgConfig)
if ( PKG_CONFIG_FOUND )
pkg_check_modules( PC_AVFORMAT libavformat )
pkg_check_modules( PC_AVCODEC libavcodec )
pkg_check_modules( PC_AVUTIL libavutil )
endif( PKG_CONFIG_FOUND)


find_library(AVFORMAT_LIBRARIES avformat
    HINTS ${PC_AVFORMAT_LIBDIR} ${PC_AVFORMAT_LIBRARY_DIRS}
)

find_library(AVCODEC_LIBRARIES avcodec
    HINTS ${PC_AVCODEC_LIBDIR} ${PC_AVCODEC_LIBRARY_DIRS}
)

find_library(AVUTIL_LIBRARIES avutil
    HINTS ${PC_AVUTIL_LIBDIR} ${PC_AVUTIL_LIBRARY_DIRS}
)


find_path(AVFORMAT_INCLUDE_DIR avformat.h
    HINTS ${PC_AVFORMAT_LIBDIR} ${PC_AVFROMAT_INCLUDE_DIRS}
    PATH_SUFFIXES libavformat
)

find_path(AVCODEC_INCLUDE_DIR avcodec.h
    HINTS ${PC_AVCODEC_LIBDIR} ${PC_AVCODEC_INCLUDE_DIRS}
    PATH_SUFFIXES libavcodec
)

find_path(AVUTIL_INCLUDE_DIR avutil.h
    HINTS ${PC_AVUTIL_LIBDIR} ${PC_AVUTIL_INCLUDE_DIRS}         
    PATH_SUFFIXES libavutil
)


SET( FFMPEG_INCLUDE_PATHS ${AVFORMAT_INCLUDE_DIR}
                               ${AVCODEC_INCLUDE_DIR}
                               ${AVUTIL_INCLUDE_DIR})


if (AVFORMAT_LIBRARIES AND AVCODEC_LIBRARIES AND AVUTIL_LIBRARIES )
SET (FFMPEG_LIBRARIES TRUE)
endif (AVFORMAT_LIBRARIES AND AVCODEC_LIBRARIES AND AVUTIL_LIBRARIES )


find_package_handle_standard_args(ffmpeg "Could not find ffmpeg; available at www.ffmpeg.org" FFMPEG_LIBRARIES FFMPEG_INCLUDE_PATHS)

mark_as_advanced(FFMPEG_INCLUDE_PATHS FFMPEG_LIBRARIES)
_______________________________________________
Kde-buildsystem mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/kde-buildsystem

Reply via email to