Closed dakotabenjamin closed 8 years ago
configure.sh only builds third party libs. Odm modules must be built apart
ah I see. So workflow here is
right! Without step 3 should work
Ok. I got it working!
We will want to wrap the compilation into a single build script. I've got a simple bash script I'll submit a PR for, unless you have a better way.
Nice! Let me think about that. I'll do some research to find the proper way to do it, but the point to have the SuperBuild is to separate the cross compilation of third party libs and the own framework modules. The SuperBuild it's not finished yet because it may happen that users have some third party libs already installed, which in this case the configure.sh will only setup the paths. This was my initial idea.
For now I've got this- doesn't work completely.
#!/bin/bash
echo "released under Creative Commons/CC-BY"
echo "Attribution"
ODM_PATH=`pwd`
MODULES_PATH="$ODM_PATH/modules"
BIN_PATH="$ODM_PATH/build/bin"
EXT_DIR="$ODM_PATH/SuperBuild/install"
## Get system vars
ARCH=`uname -m`
CORES=`grep -c processor /proc/cpuinfo`
## Remove old stuff
sudo rm -Rf "$BIN_PATH"
## create build path
mkdir -p "$BIN_PATH"
## Build Meshing
echo " Build Meshing "
cd "$MODULES_PATH/odm_meshing"
cmake . -DPCL_DIR="/home/vagrant/odm/SuperBuild/install"
make -j$CORES
cp -f "odm_meshing" "$BIN_PATH"
## Build Texturing
echo " Build Texturing"
cd "$MODULES_PATH/odm_texturing"
cmake . -DPCL_DIR="$EXT_DIR" -DOPENCV_DIR="$EXT_DIR"
make -j$CORES
cp -f "odm_texturing" $BIN_DIR
## Build Extract UTM
echo " Build ExtractUTM"
cd "$MODULES_PATH/odm_extract_utm"
cmake .
make -j$CORES
cp -f "odm_extract_utm" "$BIN_PATH"
## Build Georef
echo " Build Georef"
cd "$MODULES_PATH/odm_georef"
cmake . -DPCL_DIR="$EXT_DIR" -DOPENCV_DIR="$EXT_DIR"
make -j$CORES
cp -f "odm_georef" "$BIN_PATH"
## Build Orthophoto
echo " Build Orthophoto"
cd "$MODULES_PATH/odm_orthophoto"
cmake . -DPCL_DIR="$EXT_DIR" -DOPENCV_DIR="$EXT_DIR"
make -j$CORES
cp -f "odm_orthophoto" "$BIN_PATH"
echo "DONE"
There's no need of this script, the cmake does this job already. In the root dir do this:
mkdir build && cd build && cmake .. && make
I just noticed the CMakeLists.txt file... :disappointed:
Here's the output:
The built-in modules are not being installed right now, it seems. In opendm/context.py, it shows that the modules are being built in
odm_modules_path = os.path.join(root_path, "build/bin")
which doesn't exist.So do meshing, texturing, extract_utm, georef, and orthophoto get built in the SuperBuild or after (in the ./configure.sh script)?