[docs] fix CMakeLists example for SQLite3 (#11763)

* docs: fix CMakeLists example for SQLite3

* docs: simplify CMake config

* fix: remove extra parenthesis
This commit is contained in:
James Liu 2020-06-06 03:58:29 +10:00 committed by GitHub
parent 6ac6267f51
commit 92db9a65e6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -118,10 +118,11 @@ Now let's make a simple CMake project with a main file.
cmake_minimum_required(VERSION 3.0)
project(test)
find_package(Sqlite3 REQUIRED)
find_package(sqlite3 CONFIG REQUIRED)
add_executable(main main.cpp)
target_link_libraries(main sqlite3)
target_link_libraries(main PRIVATE sqlite3)
```
```cpp
// main.cpp