]> gitweb.factorcode.org Git - factor.git/blob - basis/alien/libraries/finder/windows/windows.factor
alien.libraries.finder: split into sub-vocabularies and implement macosx better.
[factor.git] / basis / alien / libraries / finder / windows / windows.factor
1 ! Copyright (C) 2013 Björn Lindqvist
2 ! See http://factorcode.org/license.txt for BSD license
3
4 USING: alien.libraries alien.libraries.finder arrays combinators
5 kernel sequences system ;
6
7 IN: alien.libraries.finder.windows
8
9 <PRIVATE
10
11 : candidate-paths ( name -- paths )
12     {
13         [ ".dll" append ]
14         [ "lib" ".dll" surround ]
15         [ "dlls/" ".dll" surround ]
16         [ "dlls/lib" ".dll" surround ]
17     } cleave 4array ;
18
19 PRIVATE>
20
21 M: windows find-library
22     candidate-paths [ dlopen dll-valid? ] map-find nip ;