Module: Assimp::Native::Platform
- Defined in:
- lib/assimp/native/platform.rb
Class Method Summary collapse
- .library_names(os: RbConfig::CONFIG.fetch("host_os")) ⇒ Object
- .packaged_library_name(os: RbConfig::CONFIG.fetch("host_os")) ⇒ Object
- .tag(cpu: RbConfig::CONFIG.fetch("host_cpu"), os: RbConfig::CONFIG.fetch("host_os")) ⇒ Object
Class Method Details
.library_names(os: RbConfig::CONFIG.fetch("host_os")) ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/assimp/native/platform.rb', line 23 def library_names(os: RbConfig::CONFIG.fetch("host_os")) case os when /darwin/ then %w[libassimp.5.dylib libassimp.dylib] when /mswin|mingw/ then %w[assimp-vc143-mt.dll assimp-vc142-mt.dll assimp.dll] else %w[libassimp.so.5 libassimp.so] end end |
.packaged_library_name(os: RbConfig::CONFIG.fetch("host_os")) ⇒ Object
31 32 33 34 35 36 37 |
# File 'lib/assimp/native/platform.rb', line 31 def packaged_library_name(os: RbConfig::CONFIG.fetch("host_os")) case os when /darwin/ then "libassimp.5.dylib" when /mswin|mingw/ then "assimp.dll" else "libassimp.so.5" end end |
.tag(cpu: RbConfig::CONFIG.fetch("host_cpu"), os: RbConfig::CONFIG.fetch("host_os")) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/assimp/native/platform.rb', line 10 def tag(cpu: RbConfig::CONFIG.fetch("host_cpu"), os: RbConfig::CONFIG.fetch("host_os")) case os when /darwin/ "#{darwin_cpu(cpu)}-darwin" when /linux/ "#{linux_cpu(cpu)}-linux" when /mswin|mingw/ "#{windows_cpu(cpu)}-mingw-ucrt" else "#{cpu}-#{os}".downcase.gsub(/[^a-z0-9._-]+/, "-") end end |