Skip to content

Commit

Permalink
use Devel::CheckLib to generate NA on missing libs (#48)
Browse files Browse the repository at this point in the history
  • Loading branch information
wchristian authored and devel-chm committed Feb 25, 2017
1 parent 7ebeeae commit d4acdea
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Makefile.PL
Expand Up @@ -8,6 +8,7 @@ use lib 'lib';
use OpenGL::Modern::NameLists::MakefileAll;
use Capture::Tiny 'capture';
use ExtUtils::Constant ();
use Devel::CheckLib 'assert_lib';

my $include = "-I. -Iinclude -Isrc";
my $libs;
Expand Down Expand Up @@ -106,5 +107,7 @@ sub WriteMakefile1 { #Written by Alexandr Ciornii, version 0.21. Added by eum
delete $params{ABSTRACT_FROM} if $] < 5.005;
delete $params{BINARY_LOCATION} if $] < 5.005;

die "$@\nOS unsupported\n" if not eval { assert_lib %params; 1 };

WriteMakefile( %params );
}
1 change: 1 addition & 0 deletions cpanfile
Expand Up @@ -7,6 +7,7 @@ on configure => sub {
requires 'ExtUtils::Constant' => 0;
requires 'ExtUtils::MakeMaker' => '6.17';
requires 'ExtUtils::MakeMaker::CPANfile' => 0;
requires 'Devel::CheckLib' => 0;
};

on test => sub {
Expand Down

0 comments on commit d4acdea

Please sign in to comment.