Skip to content

Commit

Permalink
[proj,rtabmap] Update proj to 9.4.0 (#37650)
Browse files Browse the repository at this point in the history
  • Loading branch information
dg0yt authored Mar 26, 2024
1 parent 9de2e97 commit 46542dd
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 40 deletions.
36 changes: 0 additions & 36 deletions ports/proj/fix-proj4-targets-cmake.patch
Original file line number Diff line number Diff line change
Expand Up @@ -2,30 +2,6 @@ diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7d736d129..2be8f8be9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -129,7 +129,22 @@ if(NOT EXE_SQLITE3)
message(SEND_ERROR "sqlite3 binary not found!")
endif()

-find_package(Sqlite3 REQUIRED)
+find_package(unofficial-sqlite3 CONFIG REQUIRED)
+if(unofficial-sqlite3_FOUND)
+ set(SQLITE3_FOUND true)
+ get_target_property(SQLITE3_INCLUDE_DIR unofficial::sqlite3::sqlite3 INTERFACE_INCLUDE_DIRECTORIES)
+ set(SQLITE3_LIBRARY unofficial::sqlite3::sqlite3)
+ # Extract version information from the header file
+ if(SQLITE3_INCLUDE_DIR)
+ file(STRINGS ${SQLITE3_INCLUDE_DIR}/sqlite3.h _ver_line
+ REGEX "^#define SQLITE_VERSION *\"[0-9]+\\.[0-9]+\\.[0-9]+\""
+ LIMIT_COUNT 1)
+ string(REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+"
+ SQLITE3_VERSION "${_ver_line}")
+ unset(_ver_line)
+ endif()
+endif()
+
if(NOT SQLITE3_FOUND)
message(SEND_ERROR "sqlite3 dependency not found!")
endif()
@@ -151,6 +165,7 @@ if(ENABLE_TIFF)
find_package(TIFF REQUIRED)
if(TIFF_FOUND)
Expand All @@ -34,15 +10,3 @@ index 7d736d129..2be8f8be9 100644
else()
message(SEND_ERROR
"libtiff dependency not found! Use ENABLE_TIFF=OFF to force it off")
diff --git a/cmake/project-config.cmake.in b/cmake/project-config.cmake.in
index 7d5579ae..0cf96252 100644
--- a/cmake/project-config.cmake.in
+++ b/cmake/project-config.cmake.in
@@ -27,6 +27,7 @@ if(@PROJECT_VARIANT_NAME@ STREQUAL "PROJ4")
endif()
cmake_policy(POP)

+find_dependency(unofficial-sqlite3 CONFIG)
if(DEFINED PROJ_CONFIG_FIND_TIFF_DEP)
find_dependency(TIFF)
endif()
2 changes: 1 addition & 1 deletion ports/proj/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO OSGeo/PROJ
REF "${VERSION}"
SHA512 45775e2b2a6b5bc490743c562155521a2ef48c5a8834cc96f88784aea785df10688f8962ae22fcac64d3b2f85378539ef1d3a082243cdc0ca3695ed8b9efa18b
SHA512 5bc53723a81d9950599d6c47a837de5e9052aa56f943951e3ad0911cbeb71585bac648f37b9b626f32bb5d0b481ce5aef9be0833910e53b4b015b573808b8981
HEAD_REF master
PATCHES
fix-win-output-name.patch
Expand Down
2 changes: 1 addition & 1 deletion ports/proj/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "proj",
"version": "9.3.1",
"version": "9.4.0",
"description": "PROJ library for cartographic projections",
"homepage": "https://proj.org/",
"license": "MIT",
Expand Down
2 changes: 2 additions & 0 deletions ports/rtabmap/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ vcpkg_from_github(
HEAD_REF master
PATCHES
fix_link.patch
sqlite3.patch
)
file(REMOVE "${SOURCE_PATH}/cmake_modules/FindSqlite3.cmake")

vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
Expand Down
48 changes: 48 additions & 0 deletions ports/rtabmap/sqlite3.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1ecd3ae..024c729 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -252,10 +252,10 @@ endif()

FIND_PACKAGE(ZLIB REQUIRED QUIET)

-FIND_PACKAGE(Sqlite3 QUIET)
-IF(Sqlite3_FOUND)
- MESSAGE(STATUS "Found Sqlite3: ${Sqlite3_INCLUDE_DIRS} ${Sqlite3_LIBRARIES}")
-ENDIF(Sqlite3_FOUND)
+FIND_PACKAGE(SQLite3 QUIET)
+IF(SQLite3_FOUND)
+ MESSAGE(STATUS "Found Sqlite3: ${SQLite3_INCLUDE_DIRS} ${SQLite3_LIBRARIES}")
+ENDIF(SQLite3_FOUND)

if(NOT "${PCL_LIBRARIES}" STREQUAL "")
# fix libproj.so not found on Xenial
@@ -1332,7 +1332,7 @@ ELSE()
MESSAGE(STATUS " With Qt = NO (Qt not found)")
ENDIF()

-IF(Sqlite3_FOUND)
+IF(SQLite3_FOUND)
MESSAGE(STATUS " With external SQLite3 = YES (License: Public Domain)")
ELSE()
MESSAGE(STATUS " With external SQLite3 = NO (sqlite3 not found, internal version is used for convenience)")
--- a/corelib/src/CMakeLists.txt
+++ b/corelib/src/CMakeLists.txt
@@ -173,14 +173,14 @@ SET(PUBLIC_LIBRARIES
${PCL_LIBRARIES}
)

-IF(Sqlite3_FOUND)
+IF(SQLite3_FOUND)
SET(INCLUDE_DIRS
${INCLUDE_DIRS}
- ${Sqlite3_INCLUDE_DIRS}
+ ${SQLite3_INCLUDE_DIRS}
)
SET(LIBRARIES
${LIBRARIES}
- ${Sqlite3_LIBRARIES}
+ ${SQLite3_LIBRARIES}
)
ELSE()
SET(SRC_FILES
1 change: 1 addition & 0 deletions ports/rtabmap/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "rtabmap",
"version": "0.21.4",
"port-version": 1,
"description": "Real-Time Appearance-Based Mapping",
"homepage": "https://introlab.github.io/rtabmap/",
"license": "BSD-3-Clause",
Expand Down
4 changes: 2 additions & 2 deletions versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -6921,7 +6921,7 @@
"port-version": 0
},
"proj": {
"baseline": "9.3.1",
"baseline": "9.4.0",
"port-version": 0
},
"proj4": {
Expand Down Expand Up @@ -7738,7 +7738,7 @@
},
"rtabmap": {
"baseline": "0.21.4",
"port-version": 0
"port-version": 1
},
"rtaudio": {
"baseline": "6.0.1",
Expand Down
5 changes: 5 additions & 0 deletions versions/p-/proj.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "62e9ace469641b907291184ebc7e76d96f629881",
"version": "9.4.0",
"port-version": 0
},
{
"git-tree": "fa1294c10c33d46c0294b3c1952d1c7aa57439a5",
"version": "9.3.1",
Expand Down
5 changes: 5 additions & 0 deletions versions/r-/rtabmap.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b50a72e16aaa8ba99447348c26463d8b47cb34f5",
"version": "0.21.4",
"port-version": 1
},
{
"git-tree": "67e8fc47e9b1181a3a00d2d5c08f2be32728c48e",
"version": "0.21.4",
Expand Down

0 comments on commit 46542dd

Please sign in to comment.