Skip to content

Commit

Permalink
bump deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Mizux committed Jul 4, 2024
1 parent ce4921d commit 55ec7a8
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 74 deletions.
8 changes: 4 additions & 4 deletions cmake/cpp.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ set(ABSL_ENABLE_INSTALL ON)
FetchContent_Declare(
absl
GIT_REPOSITORY "https://github.com/abseil/abseil-cpp.git"
GIT_TAG "20230802.0"
GIT_TAG "20240116.2"
GIT_SHALLOW TRUE
#PATCH_COMMAND git apply --ignore-whitespace "${CMAKE_CURRENT_LIST_DIR}/../patches/abseil-cpp-20230802.0.patch"
PATCH_COMMAND git apply --ignore-whitespace "${CMAKE_CURRENT_LIST_DIR}/../patches/abseil-cpp-20240116.2.patch"
OVERRIDE_FIND_PACKAGE)
FetchContent_MakeAvailable(absl)
list(POP_BACK CMAKE_MESSAGE_INDENT)
Expand All @@ -69,10 +69,10 @@ set(protobuf_WITH_ZLIB OFF)
FetchContent_Declare(
protobuf
GIT_REPOSITORY "https://github.com/protocolbuffers/protobuf.git"
GIT_TAG "v24.0"
GIT_TAG "v27.2"
GIT_SUBMODULES ""
GIT_SHALLOW TRUE
PATCH_COMMAND git apply --ignore-whitespace "${CMAKE_CURRENT_LIST_DIR}/../patches/protobuf-v24.0.patch")
PATCH_COMMAND git apply --ignore-whitespace "${CMAKE_CURRENT_LIST_DIR}/../patches/protobuf-v27.2.patch")
FetchContent_MakeAvailable(protobuf)
list(POP_BACK CMAKE_MESSAGE_INDENT)
message(CHECK_PASS "fetched")
Expand Down
49 changes: 0 additions & 49 deletions patches/abseil-cpp-20230802.0.patch

This file was deleted.

19 changes: 19 additions & 0 deletions patches/abseil-cpp-20240116.2.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
diff --git a/CMake/AbseilHelpers.cmake b/CMake/AbseilHelpers.cmake
index c53b358..9906382 100644
--- a/CMake/AbseilHelpers.cmake
+++ b/CMake/AbseilHelpers.cmake
@@ -250,6 +250,14 @@ Cflags: -I\${includedir}${PC_CFLAGS}\n")
elseif(_build_type STREQUAL "static" OR _build_type STREQUAL "shared")
add_library(${_NAME} "")
target_sources(${_NAME} PRIVATE ${ABSL_CC_LIB_SRCS} ${ABSL_CC_LIB_HDRS})
+ if(APPLE)
+ set_target_properties(${_NAME} PROPERTIES
+ INSTALL_RPATH "@loader_path")
+ elseif(UNIX)
+ set_target_properties(${_NAME} PROPERTIES
+ POSITION_INDEPENDENT_CODE ON
+ INSTALL_RPATH "$ORIGIN")
+ endif()
target_link_libraries(${_NAME}
PUBLIC ${ABSL_CC_LIB_DEPS}
PRIVATE
27 changes: 6 additions & 21 deletions patches/protobuf-v24.0.patch → patches/protobuf-v27.2.patch
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ac0d03c3a..ac8aee8a7 100644
index 9b51e9722..33c1021d4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,7 +41,7 @@ else (BUILD_SHARED_LIBS)
@@ -42,7 +42,7 @@ else (BUILD_SHARED_LIBS)
endif (BUILD_SHARED_LIBS)
option(protobuf_BUILD_SHARED_LIBS "Build Shared Libraries" ${protobuf_BUILD_SHARED_LIBS_DEFAULT})
include(CMakeDependentOption)
Expand All @@ -11,7 +11,7 @@ index ac0d03c3a..ac8aee8a7 100644
"NOT protobuf_BUILD_SHARED_LIBS" OFF)
set(protobuf_WITH_ZLIB_DEFAULT ON)
option(protobuf_WITH_ZLIB "Build with zlib support" ${protobuf_WITH_ZLIB_DEFAULT})
@@ -158,24 +158,16 @@ endif()
@@ -160,24 +160,16 @@ endif()

set(_protobuf_FIND_ZLIB)
if (protobuf_WITH_ZLIB)
Expand Down Expand Up @@ -46,26 +46,11 @@ index ac0d03c3a..ac8aee8a7 100644
endif (protobuf_WITH_ZLIB)

# We need to link with libatomic on systems that do not have builtin atomics, or
@@ -277,7 +269,6 @@ else (MSVC)
@@ -279,7 +271,6 @@ else (MSVC)
endif (MSVC)

include_directories(
- ${ZLIB_INCLUDE_DIRECTORIES}
${protobuf_BINARY_DIR}
${protobuf_SOURCE_DIR}/src)

diff --git a/cmake/libprotobuf.cmake b/cmake/libprotobuf.cmake
index 422754a1a..ea91898d5 100644
--- a/cmake/libprotobuf.cmake
+++ b/cmake/libprotobuf.cmake
@@ -26,7 +26,9 @@ endif()
if(${CMAKE_SYSTEM_NAME} STREQUAL "Android")
target_link_libraries(libprotobuf PRIVATE log)
endif()
-target_include_directories(libprotobuf PUBLIC ${protobuf_SOURCE_DIR}/src)
+target_include_directories(libprotobuf PUBLIC
+ ${protobuf_SOURCE_DIR}/src
+ ${protobuf_SOURCE_DIR})
target_link_libraries(libprotobuf PUBLIC ${protobuf_ABSL_USED_TARGETS})
protobuf_configure_target(libprotobuf)
if(protobuf_BUILD_SHARED_LIBS)
# Support #include-ing other top-level directories, i.e. upb_generator.
${protobuf_SOURCE_DIR}

0 comments on commit 55ec7a8

Please sign in to comment.