-
Notifications
You must be signed in to change notification settings - Fork 116
/
stormlib.rb
46 lines (38 loc) · 1.17 KB
/
stormlib.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
require 'formula'
class Stormlib < Formula
homepage "http://www.zezula.net/en/mpq/stormlib.html"
url "https://github.com/ladislav-zezula/StormLib/archive/v9.00a.tar.gz"
sha1 "74bdda9309cce208d4982c9a1f5d740d246a9755"
version "9.00a"
head "https://github.com/ladislav-zezula/StormLib.git"
depends_on "cmake" => :build
patch :DATA
def install
system "cmake", "CMakeLists.txt", "-DWITH_STATIC=YES", *std_cmake_args
system "make", "install"
end
test do
(testpath/"test.c").write <<-EOS.undent
#include <stdio.h>
#include <StormLib.h>
int main(int argc, char *argv[]) {
printf("%s", STORMLIB_VERSION_STRING);
return 0;
}
EOS
system ENV.cc, "-o", "test", "test.c"
system "./test", "-v"
end
end
__END__
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3b22069..03ed2c6 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -288,7 +288,6 @@ if(WITH_STATIC)
endif()
if(APPLE)
- set_target_properties(storm PROPERTIES FRAMEWORK true)
set_target_properties(storm PROPERTIES PUBLIC_HEADER "src/StormLib.h src/StormPort.h")
set_target_properties(storm PROPERTIES LINK_FLAGS "-framework Carbon")
endif()