vcpkg/ports/openmvs/no-absolute-paths.patch
2022-05-31 15:12:09 -07:00

25 lines
897 B
Diff

diff --git a/MvgMvsPipeline.py.in b/MvgMvsPipeline.py.in
index 04433f4..e1beaf6 100644
--- a/MvgMvsPipeline.py.in
+++ b/MvgMvsPipeline.py.in
@@ -95,14 +95,14 @@ def find(afile):
return d
return None
-
+current_dir = os.path.dirname(os.path.abspath(__file__))
# Try to find openMVG and openMVS binaries in PATH
-OPENMVG_BIN = whereis("openMVG_main_SfMInit_ImageListing")
-OPENMVS_BIN = whereis("ReconstructMesh")
+OPENMVG_BIN = os.path.join(current_dir, '..', 'openmvg')
+OPENMVS_BIN = current_dir
# Try to find openMVG camera sensor database
-CAMERA_SENSOR_DB_FILE = "sensor_width_camera_database.txt"
-CAMERA_SENSOR_DB_DIRECTORY = find(CAMERA_SENSOR_DB_FILE)
+CAMERA_SENSOR_DB_FILE = os.path.join(OPENMVG_BIN, 'sensor_width_camera_database.txt')
+CAMERA_SENSOR_DB_DIRECTORY = OPENMVS_BIN
# Ask user for openMVG and openMVS directories if not found
if not OPENMVG_BIN: