Skip to content

Commit 2019477

Browse files
authored
added better instructions for linux compilation
1 parent 48740ac commit 2019477

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

README.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,23 @@ The "CMakeLists.txt" file defining the static library is provided in the root di
9595
so you simply have to add_subdirectory(SQLiteCpp) to you main CMakeLists.txt
9696
and link to the "SQLiteCpp" wrapper library.
9797

98+
Example for Linux:
99+
```cmake
100+
add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/thirdparty/SQLiteCpp)
101+
102+
INCLUDE_DIRECTORIES(
103+
${CMAKE_CURRENT_LIST_DIR}/thirdparty/SQLiteCpp/include
104+
)
105+
106+
ADD_executable(main src/main.cpp)
107+
target_link_libraries(main
108+
SQLiteCpp
109+
sqlite3
110+
pthread
111+
dl
112+
)
113+
114+
```
98115
Thus this SQLiteCpp repository can be directly used as a Git submoldule.
99116
See the [SQLiteCpp_Example](https://github.com/SRombauts/SQLiteCpp_Example) side repository for a standalone "from scratch" example.
100117

0 commit comments

Comments
 (0)