AliceVision icon indicating copy to clipboard operation
AliceVision copied to clipboard

Could NOT find opengv

Open Phoenix-64 opened this issue 3 years ago • 3 comments
trafficstars

I tryed to build AliceVision using:

cmake .. -DCMAKE_TOOLCHAIN_FILE=D:\Programming\Mehsroom\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -DOPENGV_DIR=D:\Programming\Mehsroom\opengv -G "Visual Studio 15 2017" -A x64 -T host=x64

But CMAKE is not able to find opengv that I cloned using: git clone https://github.com/alicevision/opengv.git --branch=cmake_fix_install

So far I followed INSTALL.md but now I am stuck. Did I include it wrongly or why is it not finding opengv?

CMakeError.log CMakeOutput.log

Phoenix-64 avatar Sep 16 '22 08:09 Phoenix-64

-DOPENGV_DIR should point to the directory containing the cmake config where you installed opengv. In opengv you should have done something like

cmake .. -DCMAKE_INSTALL_PREFIX:PATH="/path/where/to/install"
make install

then in alicevision you should use -DOPENGV_DIR:PATH=/path/where/to/install/lib/cmake/opengv-1.0 (check the path contains the cmake config files)

simogasp avatar Sep 16 '22 10:09 simogasp

Okay I now did the following: git clone https://github.com/alicevision/opengv.git --branch=cmake_fix_install cd opengv mkdir build cd build cmake ..

And then in AliceVision/build cmake .. -DCMAKE_TOOLCHAIN_FILE=D:\Programming\Mehsroom\vcpkg\scripts\buildsystems\vcpkg.cmake -DVCPKG_TARGET_TRIPLET=x64-windows -DOPENGV_DIR:PATH=D:\Programming\Mehsroom\opengv\build -G "Visual Studio 15 2017" -A x64 -T host=x64

But I still get the same error and make install is not a known command

-DOPENGV_DIR should point to the directory containing the cmake config where you installed opengv. In opengv you should have done something like

cmake .. -DCMAKE_INSTALL_PREFIX:PATH="/path/where/to/install"
make install

then in alicevision you should use -DOPENGV_DIR:PATH=/path/where/to/install/lib/cmake/opengv-1.0 (check the path contains the cmake config files)

Phoenix-64 avatar Sep 16 '22 15:09 Phoenix-64

in opengv you have to do from the build directory you created

cmake .. -DCMAKE_INSTALL_PREFIX:PATH=D:\Programming\Mehsroom\opengv\build\install
make install

and then in alicevision use -DOPENGV_DIR:PATH=D:\Programming\Mehsroom\opengv\build\install\lib\cmake\opengv-1.0

simogasp avatar Sep 16 '22 16:09 simogasp

did you fix this? I'm having the same problem

RufinoN avatar Jan 20 '23 14:01 RufinoN

No unfortuonetly not

Phoenix-64 avatar Jan 20 '23 17:01 Phoenix-64

try with -Dopengv_DIR instead of -DOPENGV_DIR

simogasp avatar Jan 20 '23 18:01 simogasp