Open adamski opened 12 months ago
i dont think you need to link it its not a library its a header. I don't know how to use CPM but i looked it up and try something like this:
if(sqlite_modern_cpp_ADDED)
target_include_directories(...)
endif();
This has been working for me.
CPMAddPackage(
GITHUB_REPOSITORY SqliteModernCpp/sqlite_modern_cpp
VERSION 3.2
DOWNLOAD_ONLY
)
add_library(sqlite_modern_cpp INTERFACE)
target_include_directories(sqlite_modern_cpp
INTERFACE
$<BUILD_INTERFACE:${sqlite_modern_cpp_SOURCE_DIR}/hdr>
)
Then add sqlite_modern_cpp
to target_link_libraries() for your project.
I'm trying to use this library via the standard method of FetchContent and CPM in my CMakeLists.txt.
And then link it:
However although I can see it's been downloaded, it can't find the include:
Is this installation and usage method supported?