我从 github 克隆了一个项目并运行 cmake,但收到消息:
-- checking for module 'sqlite3>=3.7.11'
-- package 'sqlite3>=3.7.11' not found
CMake Error at /usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:266 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake-2.8/Modules/FindPkgConfig.cmake:320 (_pkg_check_modules_internal)
cmake/Modules/FindSqlite3.cmake:22 (pkg_check_modules)
src/components/utils/src/sqlite_wrapper/CMakeLists.txt:33 (find_package)
-- Found Sqlite3: /usr/lib/x86_64-linux-gnu/libsqlite3.so
我的 sqlite3 有版本:
sqlite3 --version
3.8.10.2 2015-05-20 18:17:19
我已经安装了libsqlite3-dev
。
要检查的代码sqlite
:
if (SQLITE3_LIBRARIES AND SQLITE3_INCLUDE_DIRS)
set(SQLITE3_FOUND TRUE)
else (SQLITE3_LIBRARIES AND SQLITE3_INCLUDE_DIRS)
find_package(PkgConfig)
if (PKG_CONFIG_FOUND)
pkg_check_modules(_SQLITE3 REQUIRED sqlite3>=3.7.11)
else (PKG_CONFIG_FOUND)
message(WARNING "PkgConfig isn't installed. You need to sure sqlite3>=3.7.11")
endif (PKG_CONFIG_FOUND)
我该如何修复这个错误?