I'm trying to find SQLiteCpp using this CMakeLists.txt on Ubuntu 17.04 64bit.
# CMakeLists.txt
cmake_minimum_required(VERSION 3.7)
project(shule)
find_package(SQLiteCpp CONFIG REQUIRED)
include_directories(${SQLITECPP_INCLUDE_DIR})
set(SOURCE src/main.cpp)
add_executable(shule ${SOURCE})
target_link_libraries(shule SQLiteCpp)
The SQLiteCpp is installed under 'usr/local/lib'
with the name 'libSQLiteCpp.a'
and its CMake scripts, 'SQLiteCppConfig.cmake'
and 'SQLiteCppConfig-noconfig.cmake'
, are installed under 'usr/local/lib/cmake/SQLiteCpp'. The include files are installed under 'usr/local/include/SQLiteCpp'`. I'm trying to compile the following simple file.
#include <iostream>
#include <string>
#include <SQLiteCpp.h>
int main(int argc, char** argv)
{
std::cout << "Database" << std::endl;
return 0;
}
I get the error message SQLiteCpp.h: No such file or directory #include . What am I missing?
#include <SQLiteCpp/SQLiteCpp.h>
– Russley Shaw