File tree Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Expand file tree Collapse file tree 1 file changed +3
-7
lines changed Original file line number Diff line number Diff line change @@ -15,10 +15,6 @@ def sys(cmd)
15
15
ret
16
16
end
17
17
18
- def windows?
19
- RbConfig ::CONFIG [ 'host_os' ] =~ /mswin|mingw/
20
- end
21
-
22
18
if !( MAKE = find_executable ( 'gmake' ) || find_executable ( 'make' ) )
23
19
abort "ERROR: GNU make is required to build Rugged."
24
20
end
@@ -59,7 +55,7 @@ def windows?
59
55
abort "ERROR: CMake is required to build Rugged."
60
56
end
61
57
62
- if !windows ? && !find_executable ( 'pkg-config' )
58
+ if !Gem . win_platform ? && !find_executable ( 'pkg-config' )
63
59
abort "ERROR: pkg-config is required to build Rugged."
64
60
end
65
61
@@ -68,14 +64,14 @@ def windows?
68
64
69
65
Dir . chdir ( "build" ) do
70
66
# On Windows, Ruby-DevKit is MSYS-based, so ensure to use MSYS Makefiles.
71
- generator = "-G \" MSYS Makefiles\" " if windows ?
67
+ generator = "-G \" MSYS Makefiles\" " if Gem . win_platform ?
72
68
sys ( "cmake .. -DBUILD_CLAR=OFF -DTHREADSAFE=ON -DBUILD_SHARED_LIBS=OFF -DCMAKE_C_FLAGS=-fPIC -DCMAKE_BUILD_TYPE=RelWithDebInfo #{ generator } " )
73
69
sys ( MAKE )
74
70
75
71
# "normal" libraries (and libgit2 builds) get all these when they build but we're doing it
76
72
# statically so we put the libraries in by hand. It's important that we put the libraries themselves
77
73
# in $LIBS or the final linking stage won't pick them up
78
- if windows ?
74
+ if Gem . win_platform ?
79
75
$LDFLAGS << " " + "-L#{ Dir . pwd } /deps/winhttp"
80
76
$LIBS << " -lwinhttp -lcrypt32 -lrpcrt4 -lole32"
81
77
else
You can’t perform that action at this time.
0 commit comments