vcpkg/ports/ceres/0002_use_glog_target.patch
Johannes Schönberger 4a4b6702f1
[ceres + downstreams] Update to ceres to 2.2.0 (#42475)
Co-authored-by: Billy Robert O'Neal III <bion@microsoft.com>
Co-authored-by: Kai Pastor <dg0yt@darc.de>
2024-12-13 09:49:30 -05:00

26 lines
1.1 KiB
Diff

diff --git a/internal/ceres/CMakeLists.txt b/internal/ceres/CMakeLists.txt
index f9fc2415..0aaabe4d 100644
--- a/internal/ceres/CMakeLists.txt
+++ b/internal/ceres/CMakeLists.txt
@@ -85,17 +85,9 @@ endif (SCHUR_SPECIALIZATIONS)
set_source_files_properties(${CERES_INTERNAL_SCHUR_FILES} PROPERTIES
SKIP_UNITY_BUILD_INCLUSION ON)
-if (NOT MINIGLOG AND GLOG_FOUND)
- list(APPEND CERES_LIBRARY_PUBLIC_DEPENDENCIES ${GLOG_LIBRARIES})
- if (gflags_FOUND)
- # If glog & gflags are both found, we assume that glog was built with
- # gflags, as it is awkward to perform a try_compile() to verify this
- # when gflags is an imported target (as it is in newer versions).
- # As glog #includes gflags/gflags.h in glog/logging.h if compiled with
- # gflags, it is thus a public dependency for Ceres in this case.
- list(APPEND CERES_LIBRARY_PUBLIC_DEPENDENCIES gflags)
- endif()
-endif (NOT MINIGLOG AND GLOG_FOUND)
+if (NOT MINIGLOG)
+ list(APPEND CERES_LIBRARY_PUBLIC_DEPENDENCIES glog::glog)
+endif (NOT MINIGLOG)
if (SUITESPARSE AND SuiteSparse_FOUND)
# Define version information for use in Solver::FullReport.