[g2o] Fix suitesparse lookup and export (#37748)

Ported from #37651.
This commit is contained in:
Kai Pastor 2024-03-27 23:38:19 +01:00 коммит произвёл GitHub
Родитель 3f9e739cf7
Коммит d0b3e8efe3
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: B5690EEEBB952194
5 изменённых файлов: 41 добавлений и 2 удалений

32
ports/g2o/csparse.diff Normal file
Просмотреть файл

@ -0,0 +1,32 @@
diff --git a/cmake_modules/FindCSparse.cmake b/cmake_modules/FindCSparse.cmake
index 5af693d..8be574f 100644
--- a/cmake_modules/FindCSparse.cmake
+++ b/cmake_modules/FindCSparse.cmake
@@ -15,6 +15,8 @@ find_path(CSPARSE_INCLUDE_DIR NAMES cs.h
)
find_library(CSPARSE_LIBRARY NAMES cxsparse libcxsparse
+ cxsparsed libcxsparsed
+ NAMES_PER_DIR
PATHS
/usr/lib
/usr/local/lib
diff --git a/g2o/solvers/csparse/CMakeLists.txt b/g2o/solvers/csparse/CMakeLists.txt
index 60d1269..e6b80fc 100644
--- a/g2o/solvers/csparse/CMakeLists.txt
+++ b/g2o/solvers/csparse/CMakeLists.txt
@@ -2,13 +2,13 @@ if(NOT G2O_USE_CSPARSE)
return()
endif()
-include_directories(${CSPARSE_INCLUDE_DIR})
add_library(csparse_extension ${G2O_LGPL_LIB_TYPE}
csparse_helper.cpp csparse_helper.h
csparse_extension.cpp csparse_extension.h
g2o_csparse_extension_api.h
)
+target_include_directories(csparse_extension PUBLIC ${CSPARSE_INCLUDE_DIR})
set_target_properties(csparse_extension PROPERTIES OUTPUT_NAME ${LIB_PREFIX}csparse_extension)
if (APPLE)
set_target_properties(csparse_extension PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")

Просмотреть файл

@ -4,6 +4,8 @@ vcpkg_from_github(
REF fcba4eaca6f20d9a5792404cc8ef303aeb8ba5d2 REF fcba4eaca6f20d9a5792404cc8ef303aeb8ba5d2
SHA512 41e5a6d40db10d66182653d56f937f29264bf4f9412dfa651be949caeb055741c9d9ba75a122180892aafe7d45b334d50470284121148c0561e1d49f6ba5e20a SHA512 41e5a6d40db10d66182653d56f937f29264bf4f9412dfa651be949caeb055741c9d9ba75a122180892aafe7d45b334d50470284121148c0561e1d49f6ba5e20a
HEAD_REF master HEAD_REF master
PATCHES
csparse.diff
) )
string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_LGPL_SHARED_LIBS) string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" BUILD_LGPL_SHARED_LIBS)

Просмотреть файл

@ -1,7 +1,7 @@
{ {
"name": "g2o", "name": "g2o",
"version-date": "2020-02-07", "version-date": "2020-02-07",
"port-version": 4, "port-version": 5,
"description": "g2o: A General Framework for Graph Optimization", "description": "g2o: A General Framework for Graph Optimization",
"homepage": "https://openslam.org/g2o.html", "homepage": "https://openslam.org/g2o.html",
"dependencies": [ "dependencies": [

Просмотреть файл

@ -2886,7 +2886,7 @@
}, },
"g2o": { "g2o": {
"baseline": "2020-02-07", "baseline": "2020-02-07",
"port-version": 4 "port-version": 5
}, },
"g3log": { "g3log": {
"baseline": "2.4", "baseline": "2.4",

Просмотреть файл

@ -1,5 +1,10 @@
{ {
"versions": [ "versions": [
{
"git-tree": "dd362c97bd5a71ae6c3abad13da61b6323e8746f",
"version-date": "2020-02-07",
"port-version": 5
},
{ {
"git-tree": "fb61dcf5596f2a9212644c4ac8736831b7448ba5", "git-tree": "fb61dcf5596f2a9212644c4ac8736831b7448ba5",
"version-date": "2020-02-07", "version-date": "2020-02-07",