痛苦的過程,編譯glomap

记个笔记拉發表於2024-11-25

因為3dgs專案的需要,重新編譯glomap程式碼,恢復其原始尺寸

根目錄CMakeLists.txt 中, cmake_minimum_required(VERSION 3.28) 後新增 include(E:/work/vcpkg/scripts/buildsystems/vcpkg.cmake)
新建build目錄,在其目錄下執行 cmake .. -G "Visual Studio 17 2022" ,(官方使用的ninja,實在沒有安裝成功)
可能git clone 錯誤,新增git代理 git config --global http.proxy 10.66.8.234:7890
先報幾個庫找不到,乾脆加 “庫名_DIR” 到 對應CMakeFile中,後生成sln ,
類似GMP找不到, set(GMP_INCLUDE_DIR "E:\work\vcpkg\packages\gmp_x64-windows\include")
-------------
set(CGAL_DIR "E:\work\vcpkg\installed\x64-windows\share\cgal\")
set(Qt5_DIR "E:\work\vcpkg\packages\qt5-base_x64-windows\share\cmake\Qt5")
set(GMP_INCLUDE_DIR "E:\work\vcpkg\packages\gmp_x64-windows\include")
set(GMP_LIBRARIES "E:\work\vcpkg\packages\gmp_x64-windows\lib")
set(MPFR_INCLUDE_DIR "E:\work\vcpkg\packages\gmp_x64-windows\include")
set(MPFR_LIBRARIES "E:\work\vcpkg\packages\gmp_x64-windows\lib")

-------------------

cmake .. -G"Visual Studio 17 2022" -DCGAL_DIR=E:\dataset\3DGAUSSE\code\colmap\vcpkg\installed\x64-windows\share\cgal -DGLEW_INCLUDE_DIRS=E:\dataset\3DGAUSSE\code\colmap\vcpkg\packages\glew_x64-windows\include -DGLEW_LIBRARIES=E:\dataset\3DGAUSSE\code\colmap\vcpkg\packages\glew_x64-windows\lib

相關文章