sqlite_modern_cpp icon indicating copy to clipboard operation
sqlite_modern_cpp copied to clipboard

Possible to use via FetchContent or CPM?

Open adamski opened this issue 2 years ago • 2 comments

I'm trying to use this library via the standard method of FetchContent and CPM in my CMakeLists.txt.

CPMAddPackage(
        NAME sqlite_modern_cpp
        GIT_REPOSITORY https://github.com/SqliteModernCpp/sqlite_modern_cpp.git
        GIT_TAG v3.2
)

And then link it:

target_link_libraries(${PROJECT_NAME} sqlite_modern_cpp)

However although I can see it's been downloaded, it can't find the include:

#include <sqlite_modern_cpp.h>
fatal error: 'sqlite_modern_cpp.h' file not found

Is this installation and usage method supported?

adamski avatar Dec 09 '23 16:12 adamski

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();

codethinki avatar Dec 15 '23 19:12 codethinki