-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathroboptim-capsule.rb
More file actions
37 lines (28 loc) · 951 Bytes
/
roboptim-capsule.rb
File metadata and controls
37 lines (28 loc) · 951 Bytes
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
require "formula"
class RoboptimCapsule < Formula
homepage "http://www.roboptim.net/"
head 'https://github.com/roboptim/roboptim-capsule.git'
depends_on "cmake" => :build
depends_on "doxygen" => :build
depends_on "pkg-config" => :build
depends_on "qhull"
depends_on "roboptim/roboptim/roboptim-core"
#FIXME: should be optional / configurable
depends_on "roboptim/roboptim/roboptim-core-plugin-ipopt"
def install
args = std_cmake_args
# Always remove -Werror flag.
args << "-DCXX_DISABLE_WERROR:BOOL=ON"
# Remove SOVERSION.
inreplace 'src/CMakeLists.txt',
'SET_TARGET_PROPERTIES(${LIBRARY_NAME}',
'# SET_TARGET_PROPERTIES(${LIBRARY_NAME}'
ENV.append_path "PKG_CONFIG_PATH",
"#{HOMEBREW_PREFIX}/lib/pkgconfig"
system "cmake", ".", *args
system "make", "install"
end
test do
system "pkg-config", "--cflags", "roboptim-capsule"
end
end