fix: use date 3.0.4

This commit is contained in:
Nicholas Dudfield
2025-07-26 18:04:49 +07:00
parent d4ab8c4f1c
commit 039aa56fc4
3 changed files with 20 additions and 3 deletions

View File

@@ -161,6 +161,13 @@ target_link_libraries (xrpl_core
ed25519::ed25519
date::date
Ripple::opts)
# Link date-tz library when enhanced logging is enabled
if(DEFINED BEAST_ENHANCED_LOGGING AND BEAST_ENHANCED_LOGGING)
if(TARGET date::date-tz)
target_link_libraries(xrpl_core PUBLIC date::date-tz)
endif()
endif()
#[=================================[
main/core headers installation
#]=================================]

View File

@@ -9,13 +9,23 @@
find_package (date QUIET)
if (NOT TARGET date::date)
# Tell date to build the timezone library
# Build the timezone library
set(BUILD_TZ_LIB ON CACHE BOOL "Build date-tz library")
set(USE_SYSTEM_TZ_DB ON CACHE BOOL "Use system timezone database")
set(ENABLE_DATE_TESTING OFF CACHE BOOL "Disable date tests")
# Critical: Disable install/export to prevent CMake errors when used as subdirectory
set(ENABLE_DATE_INSTALL OFF CACHE BOOL "Disable date library install")
FetchContent_Declare(
hh_date_src
GIT_REPOSITORY https://github.com/HowardHinnant/date.git
GIT_TAG fc4cf092f9674f2670fb9177edcdee870399b829
GIT_TAG v3.0.4
)
FetchContent_MakeAvailable(hh_date_src)
# The aliases should already exist in 3.0.4, but ensure they're available
if(TARGET date-tz AND NOT TARGET date::date-tz)
add_library(date::date-tz ALIAS date-tz)
endif()
endif ()

View File

@@ -25,7 +25,7 @@ class Xrpl(ConanFile):
requires = [
'boost/1.86.0',
'date/3.0.1',
'date/3.0.4',
'libarchive/3.6.0',
'lz4/1.9.3',
'grpc/1.50.1',