Alien-CSFML
view release on metacpan or search on metacpan
Returns additional linker flags to be used.
my $ldflags = $AS->ldflags(qw[audio window system]);
By default, all modules are linked but you may request certain modules
individually with the following values:
- `audio` - hardware-accelerated spatialised audio playback and recording
- `graphics` - hardware acceleration of 2D graphics including sprites, polygons and text rendering
- `network` - TCP and UDP network sockets, data encapsulation facilities, HTTP and FTP classes
- `system` - vector and Unicode string classes, portable threading and timer facilities
- `window` - window and input device management including support for joysticks, OpenGL context management
Dependencies are also automatically returned for each module type.
# Installation
The distribution is based on [Module::Build::Tiny](https://metacpan.org/pod/Module%3A%3ABuild%3A%3ATiny), so use
the following procedure:
> perl Build.PL
- x11
- xrandr
- udev
- opengl
- flac
- ogg
- vorbis
- vorbisenc
- vorbisfile
- openal
- pthread
The exact name of the packages may vary from distribution to distribution. Once
those packages are installed, don't forget to install their development headers
as well.
On a Debian based system, you'd try something like:
sudo apt-get update
sudo apt-get install libxrandr-dev libxcursor-dev libudev-dev libopenal-dev libflac-dev libvorbis-dev libgl1-mesa-dev libegl1-mesa-dev libdrm-dev libgbm-dev
examples/opengl.pl view on Meta::CPAN
return 0;
}
END
my $OBJ = $CC->compile( 'C++' => 1, source => $SRC, include_dirs => [ $SF->include_dirs ] );
my $EXE = $CC->link_executable(
objects => $OBJ,
extra_linker_flags => ' -lstdc++ ' . $SF->ldflags(qw[graphics system window]) .
# Linux:
' -lX11 -lXxf86vm -lXrandr -lpthread -ldl -lXinerama -lXcursor -lGLEW -lGL -lm -lXi'
);
print system(
( $^O eq 'MSWin32' ? '' : 'LD_LIBRARY_PATH=' . join( ':', '.', $SF->library_path(1) ) . ' ' ) .
'./' . $EXE ) ? 'Aww...' : 'Yay!';
print system( './' . $EXE ) ? 'Aww...' : 'Yay!';
END { unlink grep defined, $SRC, $OBJ, $EXE; }
lib/Alien/CSFML.pm view on Meta::CPAN
individually with the following values:
=over
=item C<audio> - hardware-accelerated spatialised audio playback and recording
=item C<graphics> - hardware acceleration of 2D graphics including sprites, polygons and text rendering
=item C<network> - TCP and UDP network sockets, data encapsulation facilities, HTTP and FTP classes
=item C<system> - vector and Unicode string classes, portable threading and timer facilities
=item C<window> - window and input device management including support for joysticks, OpenGL context management
=back
Dependencies are also automatically returned for each module type.
=head1 Installation
The distribution is based on L<Module::Build::Tiny|Module::Build::Tiny>, so use
lib/Alien/CSFML.pm view on Meta::CPAN
=item ogg
=item vorbis
=item vorbisenc
=item vorbisfile
=item openal
=item pthread
=back
The exact name of the packages may vary from distribution to distribution. Once
those packages are installed, don't forget to install their development headers
as well.
On a Debian based system, you'd try something like:
sudo apt-get update
lib/Alien/CSFML.pm view on Meta::CPAN
This program is free software; you can redistribute it and/or modify it under
the terms of The Artistic License 2.0. See the F<LICENSE> file included with
this distribution or http://www.perlfoundation.org/artistic_license_2_0. For
clarification, see http://www.perlfoundation.org/artistic_2_0_notes.
=for stopwords
macOS FreeBSD
freetype xrandr udev opengl OpenGL
flac ogg vorbis vorbisenc vorbisfile
openal pthread
spatialised
=cut
( run in 0.387 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )