date
date copied to clipboard
Taget tz is not exported in dateConfig
Build and install library:
$ mkdir build
$ cd build
$ cmake -GNinja -DCMAKE_BUILD_TYPE=Release ..
$ ninja install
Then, in another project: CMakeLists.txt:
cmake_minimum_required(VERSION 3.6)
project(testIt)
find_package(Threads REQUIRED)
find_package(date REQUIRED)
set(CMAKE_CXX_STANDARD 17)
add_executable(testIt main.cpp)
target_link_libraries(
testIt
tz
Threads::Threads
)
/testIt.dir/main.cpp.o -c ../main.cpp ../main.cpp:1:10: fatal error: date/tz.h: No such file or directory #include "date/tz.h" ^~~~~~~~~~~
CMakeLists.txt:
-tz
+date_interface
main.cpp compiles then, but doesn't link (undefined reference to `date::get_tzdb())
To fix this, tz should be exported. Here is proposed patch (with pthread stuff also):
Target tz is still not exported. Any plans to fix this?
Also an issue here.