Yalir / sfeMovie

sfeMovie is a simple C++ library that lets you play movies in SFML based applications. It relies on FFmpeg to read medias and remains consistent with SFML's naming conventions.
http://sfemovie.yalir.org/
GNU Lesser General Public License v2.1
114 stars 37 forks source link

Make CMake the starting point for building #19

Closed Ceylo closed 11 years ago

Ceylo commented 12 years ago

Instead of running CMake from the build.sh script, it would be interesting (if it's possible) to to the opposite : do the whole configuration within CMake and only some parts (like building FFmpeg) in shells scripts.

Edit: AC:

firefly2442 commented 11 years ago

http://www.openscenegraph.org/svn/osg/OpenSceneGraph/tags/OpenSceneGraph-2.9.4/CMakeModules/FindFFmpeg.cmake

Something like this may be helpful.

Ceylo commented 11 years ago

Ah thanks, the current FindFFMPEG has been hand-made by Danman and probably only works for Linux (and maybe Windows) at the moment so this should be useful.

Ceylo commented 11 years ago

Any Shell script seems to be runnable with the following Bat source :

PATH C:\MinGW\msys\1.0\bin;C:\MinGW\bin;%path%
bash -c "./build.sh windows"
PAUSE

MSYS and MinGW must be put in first place or the call to some commands like "find" will run the wrong find.exe. Besides, if the CMD shell crashes, the following patch must be applied : http://support.microsoft.com/kb/2458000

Ceylo commented 11 years ago

Confirmed to build fine with KDevelop on Linux

Ceylo commented 11 years ago

Here's a little sum up of current status of this story:

On Linux:

On Mac OS X:

On Windows:

Ceylo commented 11 years ago

The CMakeDirected branch has been merged to master and deleted.

Ceylo commented 11 years ago

Everything works fine on OS X (Xcode + Makefiles) now.

Ceylo commented 11 years ago

Everything still working fine on Linux.

Ceylo commented 11 years ago

On Windows with VS2012, FFmpeg build is launched but fails at link time with the following:

LD  libavfilter/avfilter-3.dll
  libavfilter/avf_showspectrum.o: In function `config_output':
  c:\Users\Ceylo\Downloads\sfeMovie-master\deps\ffmpeg/libavfilter/avf_showspectrum.c:135: undefined reference to `av_rdft_end'
  c:\Users\Ceylo\Downloads\sfeMovie-master\deps\ffmpeg/libavfilter/avf_showspectrum.c:136: undefined reference to `av_rdft_init'
  libavfilter/avf_showspectrum.o: In function `plot_spectrum_column':
  c:\Users\Ceylo\Downloads\sfeMovie-master\deps\ffmpeg/libavfilter/avf_showspectrum.c:241: undefined reference to `av_rdft_calc'
  libavfilter/avf_showspectrum.o: In function `uninit':
  Creating library file: libavfilter/libavfilter.dll.a
  c:\Users\Ceylo\Downloads\sfeMovie-master\deps\ffmpeg/libavfilter/avf_showspectrum.c:78: undefined reference to `av_rdft_end'
  collect2: ld a retournÚ 1 code d'Útat d'exÚcution
  make: *** [libavfilter/avfilter-3.dll] Error 1
  *** an error occured, aborting.

The error is reported here and the only fix seems to be updating FFmpeg. Wondering why I never got this issue though...

firefly2442 commented 11 years ago

Tested on Linux. Building both the provided version of FFmpeg as well as linking against the system version did not result in any errors. :)

Ceylo commented 11 years ago

Yay! :D

Ceylo commented 11 years ago

Maybe this would help at fixing the build with FFmpeg 1.0 and Visual Studio 2012: http://git.videolan.org/?p=ffmpeg.git;a=blobdiff;f=configure;h=87f16e3fe733ceddf4a18d752283ac1073a4d232;hp=8a805b1d259e828b8b9d4aa428767c4e7ff20e0b;hb=4c5a9fd65a19a893b732784dd1c4c2937705553b;hpb=0a7d4ea31b69433b1390a412540a9f072b0502a8

Ceylo commented 11 years ago

Seems like that at the moment, even if it builds, it also crashes.

Ceylo commented 11 years ago

Actually it runs fine, seems like I had made a mistake while copying the DLLs the first time.