I have a C++ project and i want to use seqlite3 on it. i am using CMake to build and add some line to CMakeLists.txt,here it is:
project(Test)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
set(CMAKE_BUILD_TYPE Debug)
cmake_minimum_required(VERSION 2.8)
aux_source_directory(. SRC_LIST)
add_executable(${PROJECT_NAME} ${SRC_LIST})
set(CMAKE_CXX_FLAGS_DEBUG "-g")
find_path(SQLITE3_INCLUDE_DIR sqlite3.h)
find_library(SQLITE3_LIBRARY sqlite3)
if(NOT SQLITE3_INCLUDE_DIR)
message(SEND_ERROR "Failed to find sqlite3")
endif()
if(NOT SQLITE3_LIBRARY)
message(SEND_ERROR "Failed to find the sqlite3 library")
endif()
when i want to rum cmake command, it get meFailed to find sqlite3 and Failed to find the sqlite3 library and could find it.
i am using ubuntu+qtcreator and version of sqlite3 that i have installed:
> sqlite3 --version
3.8.2 2013-12-06 14:53:30 27392018af4c38cc203a04b8013e2afdb1cebd0d
thanks to all...!
Aucun commentaire:
Enregistrer un commentaire