File: make_mex.sh

package info (click to toggle)
opengv 1.0%2B1git91f4b1-8
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 5,484 kB
  • sloc: cpp: 45,813; python: 152; makefile: 17; xml: 13; sh: 4
file content (21 lines) | stat: -rwxr-xr-x 1,008 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/bash
# Generate MEX files by compiling from Matlab
# This scripts intends to automate the compilation process
# by following the instructions provided in
# http://laurentkneip.github.io/opengv/page_installation.html#sec_installation_5
# We assume the installation configuration is standard
# so that every dependency can be found in an automated way

# We assume a launcher command is available: matlab
# Add OpenGV library directory to the path
export LD_LIBRARY_PATH=../build/lib:$LD_LIBRARY_PATH

# Find path to Eigen library (assumes CMake has cached EIGEN_INCLUDE_DIRS)
# See https://stackoverflow.com/questions/8474753/how-to-get-a-cmake-variable-from-the-command-line
EigenPath=$(cmake -L ../build | grep EIGEN_INCLUDE_DIRS | cut -d "=" -f2)

# Call Matlab with the compilation command
matlab -nodisplay -nosplash -nodesktop \
-r "mex -I../include -I${EigenPath} -L../build/lib -lopengv opengv.cpp -cxx, mex -I../include -I${EigenPath} -L../build/lib -lopengv opengv_donotuse.cpp -cxx, exit"