Sha256: 00c8e0fd53cd2624d5aa6779350df83d0afc8caea8892c9c6fbb5e6af7bf7ec5

Contents?: true

Size: 893 Bytes

Versions: 3

Compression:

Stored size: 893 Bytes

Contents

require 'fileutils'
require 'mkmf'

DLIB_VERSION = '19.4'
DLIB_SRCDIR = File.expand_path("../../dlib-#{DLIB_VERSION}", __FILE__)

dir_config('libjpeg')
dir_config('libpng')

have_header('jpeglib.h') or abort
have_library('jpeg', 'jpeg_std_error') or abort

have_header('png.h') or abort
have_library('png', 'png_sig_cmp') or abort

$defs << '-DPNG_SKIP_SETJMP_CHECK'
$defs << '-DDLIB_JPEG_SUPPORT'
$defs << '-DDLIB_PNG_SUPPORT'
$defs << '-DDLIB_NO_GUI_SUPPORT'
$defs << '-DNO_DEBUG'
$defs << '-O3'
$CPPFLAGS << " -I#{DLIB_SRCDIR}"
$CXXFLAGS << " -std=c++11 -funwind-tables"
$ARCH_FLAG = '-march=native'

use_cuda = File.exist?('/usr/local/cuda/lib64/libcudart.so')
if use_cuda
  $defs << '-DDLIB_USE_CUDA'
  $CPPFLAGS << " -I/usr/local/cuda/include"
  $LIBS << " -lcudart -lcurand -lcublas -lcudnn"
  $LIBPATH << "/usr/local/cuda/lib64"
end

have_func('rb_get_kwargs')
create_makefile('dlib')

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
dlib-1.2.0 ext/dlib/extconf.rb
dlib-1.1.5 ext/dlib/extconf.rb
dlib-1.1.4 ext/dlib/extconf.rb