-
Notifications
You must be signed in to change notification settings - Fork 10
/
cmake-basis.rb
85 lines (74 loc) · 2.57 KB
/
cmake-basis.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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
class CmakeBasis < Formula
desc "cmake build and installer generation tools"
homepage "https://cmake-basis.github.io"
url "https://github.com/cmake-basis/BASIS.git", :using => :git, :tag => "v3.3.1"
head "https://github.com/cmake-basis/BASIS.git", :branch => "master"
version "3.3.1"
#sha256 ""
option "without-project-tool","Don't include the app 'basisproject' which helps generate and update projects"
option "without-docs", "Don't build man pages"
option "with-perl", "Include the perl module"
option "with-perl-utilities", "Include perl standardized command line utilities"
option "with-python-utilities", "Include python standardized command line utilities"
depends_on "cmake" => :build
depends_on "doxygen" => :recommended
depends_on "python@2" => :required
#depends_on :jython => :optional
# todo: add sphinx python dependency
#depends_on :x11 # if your formula requires any X11/XQuartz components
# The optional devel block is only executed if the user passes `--devel`.
# Use this to specify a not-yet-released version of a software.
devel do
url "https://github.com/schuhschuh/cmake-basis.git", :using => :git, :branch => "develop"
end
head do
url "https://github.com/schuhschuh/cmake-basis.git", :using => :git, :branch => "master"
end
def install
cmake_args = std_cmake_args
cmake_args << "-DBUILD_DOCUMENTATION=OFF"
if build.with? "docs"
cmake_args << "-DUSE_Sphinx=ON"
else
cmake_args << "-DUSE_Sphinx=OFF"
end
if build.with? "perl"
cmake_args << "-DUSE_Perl=ON"
else
cmake_args << "-DUSE_Perl=OFF"
end
if build.with? "perl-utilities"
cmake_args << "-DBUILD_BASIS_UTILITIES_FOR_PERL=ON -DUSE_Perl=ON"
else
cmake_args << "-DBUILD_BASIS_UTILITIES_FOR_PERL=OFF"
end
if build.with? "python"
cmake_args << "-DUSE_PythonInterp=ON"
else
cmake_args << "-DUSE_PythonInterp=OFF"
end
if build.with? "python-utilities"
cmake_args << "-DBUILD_BASIS_UTILITIES_FOR_PYTHON=ON -DUSE_PythonInterp=ON"
else
cmake_args << "-DBUILD_BASIS_UTILITIES_FOR_PYTHON=OFF"
end
#if build.with? "jython"
# cmake_args << "-DUSE_JythonInterp=ON"
#else
cmake_args << "-DUSE_JythonInterp=OFF"
#end
if build.with? "project-tool"
cmake_args << "-DBUILD_PROJECT_TOOL=ON"
else
cmake_args << "-DBUILD_PROJECT_TOOL=OFF"
end
mkdir "build" do
system "cmake", "-G", "Unix Makefiles", "..", *cmake_args
system "make"
system "make", "install"
end
end
test do
system "false"
end
end