Skip to content

Commit

Permalink
fix ceres
Browse files Browse the repository at this point in the history
  • Loading branch information
ahojnnes committed Dec 10, 2024
1 parent dacc456 commit 79d503d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
14 changes: 8 additions & 6 deletions ports/ceres/0001_cmakelists_fixes.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 8e49c19e..330bb8cf 100644
index 8e49c19e..f8c61d92 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -292,27 +292,28 @@ if (SUITESPARSE)
Expand Down Expand Up @@ -43,7 +43,7 @@ index 8e49c19e..330bb8cf 100644
else (SUITESPARSE)
message("-- Building without SuiteSparse.")
list(APPEND CERES_COMPILE_OPTIONS CERES_NO_SUITESPARSE)
@@ -395,9 +396,10 @@ endif()
@@ -395,9 +396,12 @@ endif()
# GFlags.
if (GFLAGS)
# Don't search with REQUIRED as we can continue without gflags.
Expand All @@ -52,11 +52,13 @@ index 8e49c19e..330bb8cf 100644
if (gflags_FOUND)
- if (TARGET gflags)
+ if (TARGET gflags::gflags)
+ add_library(gflags ALIAS gflags::gflags)
+ if(NOT TARGET gflags)
+ add_library(gflags ALIAS gflags::gflags)
+ endif()
message("-- Found Google Flags (gflags) version ${gflags_VERSION}: ${gflags_DIR}")
else()
message("-- Detected version of gflags: ${gflags_VERSION} does not define "
@@ -430,28 +432,7 @@ if (MINIGLOG)
@@ -430,28 +434,7 @@ if (MINIGLOG)
mark_as_advanced(FORCE GLOG_INCLUDE_DIR
GLOG_LIBRARY)
else (MINIGLOG)
Expand Down Expand Up @@ -86,7 +88,7 @@ index 8e49c19e..330bb8cf 100644
endif (MINIGLOG)

if (NOT SCHUR_SPECIALIZATIONS)
@@ -466,7 +447,7 @@ endif (NOT CUSTOM_BLAS)
@@ -466,7 +449,7 @@ endif (NOT CUSTOM_BLAS)

if (BUILD_BENCHMARKS)
# Version 1.3 was first to provide import targets
Expand All @@ -95,7 +97,7 @@ index 8e49c19e..330bb8cf 100644
if (benchmark_FOUND)
message("-- Found Google benchmark library. Building Ceres benchmarks.")
else()
@@ -722,12 +703,6 @@ install(FILES "${Ceres_BINARY_DIR}/CeresConfig-install.cmake"
@@ -722,12 +705,6 @@ install(FILES "${Ceres_BINARY_DIR}/CeresConfig-install.cmake"
DESTINATION ${RELATIVE_CMAKECONFIG_INSTALL_DIR})
install(FILES "${Ceres_BINARY_DIR}/CeresConfigVersion.cmake"
DESTINATION ${RELATIVE_CMAKECONFIG_INSTALL_DIR})
Expand Down
4 changes: 3 additions & 1 deletion ports/ceres/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,6 @@ endif()

vcpkg_cmake_configure(
SOURCE_PATH "${SOURCE_PATH}"
MAYBE_UNUSED_VARIABLES
OPTIONS
${FEATURE_OPTIONS}
${TARGET_OPTIONS}
Expand All @@ -67,6 +66,9 @@ vcpkg_cmake_configure(
-DUSE_CUDA=${USE_CUDA}
-DPROVIDE_UNINSTALL_TARGET=OFF
-DMSVC_USE_STATIC_CRT=${MSVC_USE_STATIC_CRT_VALUE}
MAYBE_UNUSED_VARIABLES
CUDA
MSVC_USE_STATIC_CRT
)

vcpkg_cmake_install()
Expand Down

0 comments on commit 79d503d

Please sign in to comment.