summaryrefslogtreecommitdiff
path: root/cmake/build-release.sh
diff options
context:
space:
mode:
Diffstat (limited to 'cmake/build-release.sh')
-rwxr-xr-xcmake/build-release.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/cmake/build-release.sh b/cmake/build-release.sh
new file mode 100755
index 0000000..f278c9f
--- /dev/null
+++ b/cmake/build-release.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+#
+# A sample script showing how to build most of the options available to this system.
+# Invoke it from the top directory of SWORD by calling $ cmake/build-release.sh
+#
+
+mkdir -p build
+cd build
+# Configure with Python and Perl bindings, examples, tests and a debug build into
+# a shared library, plus static option as well. They will be installed to the
+# /opt/sword directory
+cmake -DSWORD_BINDINGS="Python Perl" \
+ -DSWORD_BUILD_EXAMPLES="Yes" \
+ -DSWORD_BUILD_TESTS="Yes" \
+ -DLIBSWORD_LIBRARY_TYPE="Shared Static" \
+ -DCMAKE_BUILD_TYPE="Release" \
+ -DCMAKE_INSTALL_PREFIX="/opt/sword" ..
+make -j10
+cd ..
+
+echo "Now the library has been built, along with the Perl and Python bindings. \
+If you now execute 'make install' from the build directory you will \
+install the library to /opt/sword if you have privileges to write there \
+with the account you execute the install from."