Closed nenesekai closed 1 year ago
I tried your example using a Debian system and faced the same problems. You might want to change the target date::date
to date::date-tz
.
cmake_minimum_required(VERSION 3.14)
project(DateTest VERSION 1.0
LANGUAGES CXX)
set(USE_SYSTEM_TZ_DB ON CACHE INTERNAL "")
set(BUILD_TZ_LIB ON CACHE INTERNAL "")
include(FetchContent)
FetchContent_Declare(date_src
GIT_REPOSITORY https://github.com/HowardHinnant/date.git
GIT_TAG v3.0.1
)
FetchContent_MakeAvailable(date_src)
add_executable(DateTest main.cpp)
target_link_libraries(DateTest PRIVATE date::date-tz
)
I also set the options to avoid curl dependency and build the library.
Hope this helps to get into the right direction.
I wrote this code according to the examples in documentation but I didn't work
I tried configure the library using vcpkg and the fetchcontent in cmake, but both come out with the same result.
My environment: Operating system: Windows 11 Pro for workstation Compiler: Visual Studio Community 2019 Release - AMD64 CPU: AMD Ryzen 5900HS Editor / IDE: Tried both on VS2019 and VSCode
This is the code
This is the build message
In case you'll need it, this is the
cmakelists.txt