Sha256: 22ac60cbd463391e61cc9ecf0d0f47131a0f1df1efd1a88d09decb3a4c0944e3

Contents?: true

Size: 840 Bytes

Versions: 1

Compression:

Stored size: 840 Bytes

Contents

require 'mittsu/renderers/generic_lib'

module Mittsu
  module GLFWLib
    extend GenericLib

    class Linux < GenericLib::Linux
      def initialize(loader = Linux)
        @loader = loader
      end

      class << self
        def libgl_paths
          Dir.glob('/usr/lib*/**/libglfw*.so*')
        rescue
          []
        end

        def ldconfig
          `ldconfig -p | grep 'libglfw3\\?\\.so'`.lines
        rescue
          []
        end
      end
    end

    class Windows < GenericLib::Base
    end

    class MacOS < GenericLib::Base
      def path
        '/usr/local/lib'
      end

      def file
        matches = Dir.glob('/usr/local/lib/libglfw*.dylib').map { |path| File.basename(path) }
        return matches.find('libglfw3.dylib') || matches.find('libglfw.3.dylib') || matches.first
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
mittsu-0.2.3 lib/mittsu/renderers/glfw_lib.rb