From 2019477b483297f2040ca3e8931517ab0de63f3e Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Fri, 15 Dec 2017 09:38:02 +0100 Subject: [PATCH 1/2] added better instructions for linux compilation --- README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/README.md b/README.md index 205a9b3..18a701b 100644 --- a/README.md +++ b/README.md @@ -95,6 +95,23 @@ The "CMakeLists.txt" file defining the static library is provided in the root di so you simply have to add_subdirectory(SQLiteCpp) to you main CMakeLists.txt and link to the "SQLiteCpp" wrapper library. +Example for Linux: +```cmake +add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/thirdparty/SQLiteCpp) + +INCLUDE_DIRECTORIES( + ${CMAKE_CURRENT_LIST_DIR}/thirdparty/SQLiteCpp/include +) + +ADD_executable(main src/main.cpp) +target_link_libraries(main + SQLiteCpp + sqlite3 + pthread + dl + ) + +``` Thus this SQLiteCpp repository can be directly used as a Git submoldule. See the [SQLiteCpp_Example](https://github.com/SRombauts/SQLiteCpp_Example) side repository for a standalone "from scratch" example. From ed30e7751dc8723aae43c10902e1b01f972c08f7 Mon Sep 17 00:00:00 2001 From: Carlos Gomes Martinho Date: Fri, 15 Dec 2017 09:39:27 +0100 Subject: [PATCH 2/2] style fix --- README.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 18a701b..e83c3ed 100644 --- a/README.md +++ b/README.md @@ -99,18 +99,17 @@ Example for Linux: ```cmake add_subdirectory(${CMAKE_CURRENT_LIST_DIR}/thirdparty/SQLiteCpp) -INCLUDE_DIRECTORIES( +include_directories( ${CMAKE_CURRENT_LIST_DIR}/thirdparty/SQLiteCpp/include ) -ADD_executable(main src/main.cpp) +add_executable(main src/main.cpp) target_link_libraries(main SQLiteCpp sqlite3 pthread dl ) - ``` Thus this SQLiteCpp repository can be directly used as a Git submoldule. See the [SQLiteCpp_Example](https://github.com/SRombauts/SQLiteCpp_Example) side repository for a standalone "from scratch" example.