1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
|
From: Boyuan Yang <byang@debian.org>
Date: Sat, 25 Jan 2025 18:12:31 -0500
Subject: Find Date library using cmake
Last-Update: 2025-01-25
---
CMakeLists.txt | 7 ++++---
src/djinterop/util/chrono.cpp | 2 +-
2 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 238d83c..b5e1898 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -41,6 +41,7 @@ option(SYSTEM_SQLITE "Use system installation of SQLite" ON)
# Require zlib >= 1.2.8
set(ZLIB_MIN_VERSION 1.2.8)
find_package(ZLIB ${ZLIB_MIN_VERSION} REQUIRED)
+find_package(date REQUIRED)
add_library(
DjInterop
@@ -221,12 +222,12 @@ target_include_directories(
target_include_directories(
DjInterop PRIVATE SYSTEM
${ZLIB_INCLUDE_DIRS}
- ext/sqlite_modern_cpp
- ext/date)
+ ${DATE_INCLUDE_DIRS})
target_link_libraries(
DjInterop PUBLIC
- ${ZLIB_LIBRARIES})
+ ${ZLIB_LIBRARIES}
+ ${date_LIBRARIES})
if(SYSTEM_SQLITE)
diff --git a/src/djinterop/util/chrono.cpp b/src/djinterop/util/chrono.cpp
index 0d551dd..475aece 100644
--- a/src/djinterop/util/chrono.cpp
+++ b/src/djinterop/util/chrono.cpp
@@ -22,7 +22,7 @@
#include <stdexcept>
#include <string>
-#include <date.h>
+#include <date/date.h>
namespace djinterop::util
{
|