Using as part of another project
CMakeLists.txt Still trying to get this to 'work' with embedding the source code; maybe I'm barking up the wrong tree.
I have built SQLiteCpp and have SQLiteCpp include directory under "kdedev/include" and libSQLiteCpp.a under "kdedev/lib/x86_64-linux-gnu".
I don't want/extect to (re)build the library from the other project. I just need the headers and the library.
My CMakeList.txt is attached.
cmake works, but when I try the make, the include files aren't found. What am I missing. Thanks
Mm, I never try to use libs in this way, always using either the installed lib or full source.
So I am not sure of what would be wrong with your usage of find_path & target_include_directories Perhaps could you try with the simplest form (just to be sure)
include_directories("${SQLITEINC}")
Also, are you using latest version of the master branch?
Let me know if you have tried with latest update on master, I have a user using the SQLiteCpp has an installed lib successfully now
The attached CMakeLists.txt file does what I needed. I tested it with your SQLiteCpp_Exmplle
This assumes the staic library is in /usr/local/lib and the incldes are in /usr/include
Thanks for your help Leo
Thanks for providing the CMakeLists.txt. I'll leave this open for a while, in the hope I'll get to use this in a testing script.
The easiest way to test this (in Ubuntu) is to
Build SQLiteCpp Install in a standard directory (/usr/include /usr/lib) Clone https://github.com/SRombauts/SQLiteCpp_Example.git Replace the CMakeLists.txt with mine Modify the exe target to match the test Build and Test
Should all work. Cheers, Leo