From 93015768e477a0b4cbc2ab790ba39026ef2ba4b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=A0=95=E8=90=BD=E7=9A=84=E9=BB=91=E5=85=89?= <73220784+du-xinyi@users.noreply.github.com> Date: Wed, 23 Jul 2025 20:28:02 +0800 Subject: [PATCH] Fix the high level glog need defined GLOG_EXPORT or GLOG_NO_EXPORT --- modules/sfm/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/sfm/CMakeLists.txt b/modules/sfm/CMakeLists.txt index 46da72e309a..0fa6722ec9f 100644 --- a/modules/sfm/CMakeLists.txt +++ b/modules/sfm/CMakeLists.txt @@ -11,6 +11,7 @@ if(NOT Gflags_FOUND) # Ceres find gflags on the own, so separate search isn't n endif() if(NOT (Glog_FOUND OR glog_FOUND)) # Ceres find glog on the own, so separate search isn't necessary find_package(Glog QUIET) + add_compile_definitions(GLOG_USE_GLOG_EXPORT) endif() if(NOT Gflags_FOUND OR NOT (Glog_FOUND OR glog_FOUND)) @@ -21,6 +22,7 @@ if(NOT Gflags_FOUND OR NOT (Glog_FOUND OR glog_FOUND)) endif() if(NOT (Glog_FOUND OR glog_FOUND)) find_package(Glog QUIET) + add_compile_definitions(GLOG_USE_GLOG_EXPORT) endif() endif()