Skip to content

Commit

Permalink
Add -I/usr/include/ffmpeg to CXXFLAGS
Browse files Browse the repository at this point in the history
  • Loading branch information
wedesoft committed Jan 9, 2014
1 parent bf89e34 commit 36f2537
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 10 deletions.
8 changes: 2 additions & 6 deletions Rakefile
Expand Up @@ -7,7 +7,7 @@ require 'rake/loaders/makefile'
require 'rbconfig'

PKG_NAME = 'hornetseye-xorg'
PKG_VERSION = '1.0.5'
PKG_VERSION = '1.0.6'
CFG = RbConfig::CONFIG
CXX = ENV[ 'CXX' ] || 'g++'
RB_FILES = FileList[ 'lib/**/*.rb' ]
Expand Down Expand Up @@ -41,6 +41,7 @@ $LIBRUBYARG = "-L#{CFG[ 'libdir' ]} #{CFG[ 'LIBRUBYARG' ]} #{CFG[ 'LDFLAGS' ]} "
$SITELIBDIR = CFG[ 'sitelibdir' ]
$SITEARCHDIR = CFG[ 'sitearchdir' ]
$LDSHARED = CFG[ 'LDSHARED' ][ CFG[ 'LDSHARED' ].index( ' ' ) .. -1 ]
$CXXFLAGS = "#{$CXXFLAGS} -I/usr/include/ffmpeg"

task :default => :all

Expand Down Expand Up @@ -105,16 +106,11 @@ file 'ext/config.h' do |t|
# need to compile with -D__STDC_CONSTANT_MACROS
if check_c_header 'libswscale/swscale.h'
s << "#define HAVE_LIBSWSCALE_INCDIR 1\n"
s << "#undef HAVE_FFMPEG_LIBSWSCALE_INCDIR 1\n"
elsif check_c_header 'ffmpeg/libswscale/swscale.h'
s << "#undef HAVE_LIBSWSCALE_INCDIR\n"
s << "#define HAVE_FFMPEG_LIBSWSCALE_INCDIR 1\n"
else
unless check_c_header 'ffmpeg/swscale.h'
raise 'Cannot find swscale.h header file'
end
s << "#undef HAVE_LIBSWSCALE_INCDIR\n"
s << "#undef HAVE_FFMPEG_LIBSWSCALE_INCDIR 1\n"
end
File.open( t.name, 'w' ) { |f| f.puts s }
end
Expand Down
2 changes: 0 additions & 2 deletions ext/ximagepainter.cc
Expand Up @@ -43,8 +43,6 @@
extern "C" {
#ifndef HAVE_LIBSWSCALE_INCDIR
#include <ffmpeg/swscale.h>
#elif HAVE_FFMPEG_LIBSWSCALE_INCDIR
#include <ffmpeg/libswscale/swscale.h>
#else
#include <libswscale/swscale.h>
#endif
Expand Down
2 changes: 0 additions & 2 deletions ext/xvideoimagepainter.cc
Expand Up @@ -19,8 +19,6 @@
extern "C" {
#ifndef HAVE_LIBSWSCALE_INCDIR
#include <ffmpeg/swscale.h>
#elif HAVE_FFMPEG_LIBSWSCALE_INCDIR
#include <ffmpeg/libswscale/swscale.h>
#else
#include <libswscale/swscale.h>
#endif
Expand Down

0 comments on commit 36f2537

Please sign in to comment.