Skip to content

Build options for devendored build - #188

Merged
mr-smidge merged 1 commit into
mainfrom
enh/devendored-build-options
May 17, 2026
Merged

Build options for devendored build#188
mr-smidge merged 1 commit into
mainfrom
enh/devendored-build-options

Conversation

@mr-smidge

Copy link
Copy Markdown
Contributor

Add build options for a fully devendored build. libdjinterop previously would always use its bundled copies of date.h and sqlite-modern-cpp, but vcpkg has these in its inventory, so these options offer the ability to use that.

This should make the following vcpkg patches for libdjinterop redundant: microsoft/vcpkg#50062

Hopefully fixes #184 too.

@mr-smidge mr-smidge self-assigned this May 15, 2026
@mr-smidge mr-smidge added the build Relating to the build label May 15, 2026
#include <string>

#include <date.h>
#include <date/date.h>

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main github repo seems to use #include <date.h>, but the vcpkg installation results in a prefix, so #include <date/date.h>. The latter seems better, so I've aligned the bundled code with that.

date::sys_time<std::chrono::seconds> tp;
in >> date::parse("%F %T", tp);
date::sys_seconds tp;
date::from_stream(in, "%F %T", tp);

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For reasons I haven't been able to work out, the vcpkg version of date.h fails to compile on g++ 14, but changing parse() to from_stream() works fine.

Possibly relevant: https://stackoverflow.com/questions/77509755/dateparse-no-matching-overloaded-function-found

@mr-smidge
mr-smidge marked this pull request as ready for review May 15, 2026 22:26
@mr-smidge

Copy link
Copy Markdown
Contributor Author

I've tested that example applications using libdjinterop via CMake's find_dependency() work correctly, both in a default setup using vendored dependencies, but also with vcpkg and a fully devendored approach.

@mr-smidge
mr-smidge merged commit d21f713 into main May 17, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Relating to the build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

data::data is missing in static builds

1 participant