Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion SuperBuild/cmake/External-Ceres.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ExternalProject_Add(${_proj_name}
URL http://ceres-solver.org/ceres-solver-2.0.0.tar.gz
#--Update/Patch step----------
UPDATE_COMMAND ""
PATCH_COMMAND git apply ${CMAKE_MODULE_PATH}/ceres.patch
PATCH_COMMAND patch -p1 < ${CMAKE_MODULE_PATH}/ceres.patch
#--Configure step-------------
SOURCE_DIR ${SB_SOURCE_DIR}/${_proj_name}
CMAKE_ARGS
Expand Down
3 changes: 2 additions & 1 deletion SuperBuild/cmake/External-GDAL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ ExternalProject_Add(${_proj_name}
CMAKE_ARGS
-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
-DCMAKE_INSTALL_PREFIX:PATH=${SB_INSTALL_DIR}
-DGDAL_PYTHON_INSTALL_PREFIX=${SB_INSTALL_DIR}
-DGDAL_PYTHON_INSTALL_PREFIX=${PYTHON_HOME}
-DPython_EXECUTABLE=${PYTHON_EXE_PATH}
-DBUILD_PYTHON_BINDINGS=ON
${WIN32_CMAKE_ARGS}
#--Build step-----------------
Expand Down
27 changes: 12 additions & 15 deletions configure.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Ensure the DEBIAN_FRONTEND environment variable is set for apt-get calls
APT_GET="env DEBIAN_FRONTEND=noninteractive $(command -v apt-get)"

check_version(){
check_version(){
UBUNTU_VERSION=$(lsb_release -r)
case "$UBUNTU_VERSION" in
*"20.04"*|*"21.04"*|*"24.04"*)
Expand Down Expand Up @@ -107,15 +107,15 @@ installruntimedepsonly() {

installreqs() {
cd /code

## Set up library paths
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$RUNPATH/SuperBuild/install/lib

## Before installing
echo "Updating the system"
ensure_prereqs
check_version

echo "Installing Required Requisites"
installdepsfromsnapcraft build prereqs
echo "Installing OpenCV Dependencies"
Expand All @@ -126,7 +126,7 @@ installreqs() {
installdepsfromsnapcraft build openmvs
echo "Installing GDAL Dependencies"
installdepsfromsnapcraft build gdal

set -e

# edt requires numpy to build
Expand All @@ -135,15 +135,13 @@ installreqs() {
}

installpython() {
echo "Installing Python requirements with compiled GDAL"
echo "Installing Python requirements"
cd /code
export GDAL_CONFIG=${RUNPATH}/SuperBuild/install/bin/gdal-config

set -e
venv/bin/pip install -r requirements.txt --ignore-installed
set +e
}

install() {
installreqs

Expand All @@ -160,21 +158,20 @@ install() {
fi

set -eo pipefail

echo "Compiling SuperBuild"
cd ${RUNPATH}/SuperBuild
mkdir -p build && cd build
cmake .. \
-DBUILD_PYTHON_BINDINGS=ON \
-DPython_ROOT=/code/venv \
-DPython_FIND_VIRTUALENV=ONLY \
&& make -j$processes
cmake .. && make -j$processes

# Reset terminal state
cd ${RUNPATH}
set +eo pipefail

installpython

echo "Configuration Finished"
}

uninstall() {
check_version

Expand Down
Loading