|
1 |
| -# Example CMake file for compiling & linking a project with the the SQLiteCpp wrapper |
2 |
| -# |
3 |
| -# Copyright (c) 2012-2020 Sebastien Rombauts ([email protected]) |
4 |
| -# |
5 |
| -# Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt |
6 |
| -# or copy at http://opensource.org/licenses/MIT) |
7 |
| -cmake_minimum_required(VERSION 3.1) # for "CMAKE_CXX_STANDARD" version |
8 |
| -project(SQLiteCpp_Example VERSION 2.0) |
| 1 | +# Example CMake file for compiling & linking a project with the the SQLiteCpp wrapper |
| 2 | +# |
| 3 | +# Copyright (c) 2012-2020 Sebastien Rombauts ([email protected]) |
| 4 | +# |
| 5 | +# Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt |
| 6 | +# or copy at http://opensource.org/licenses/MIT) |
| 7 | +cmake_minimum_required(VERSION 3.1) # for "CMAKE_CXX_STANDARD" version |
| 8 | +project(SQLiteCpp_Example VERSION 2.0) |
9 | 9 |
|
10 | 10 | # SQLiteC++ 3.x now requires C++11 compiler
|
11 | 11 | set(CMAKE_CXX_STANDARD 11)
|
12 | 12 | set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
13 |
| - |
14 |
| -# Add SQLite3 C++ wrapper around sqlite3 library (and sqlite3 itself provided for ease of use) |
15 |
| -# Here you can set CMake variables to avoid building Example, as well as cpplint, cppcheck... |
16 |
| -# or set them in the cmake command line (see for instance provided build.bat/build.sh scripts) |
17 |
| -set(SQLITECPP_RUN_CPPCHECK OFF CACHE BOOL "" FORCE) |
18 |
| -set(SQLITECPP_RUN_CPPLINT OFF CACHE BOOL "" FORCE) |
19 |
| -add_subdirectory(../.. SQLiteCpp) # out-of-source build requires explicit subdir name for compilation artifacts |
20 |
| - |
21 |
| -# Add main.cpp example source code to the executable |
22 |
| -add_executable(SQLiteCpp_Example src/main.cpp) |
23 |
| - |
24 |
| -# Link SQLiteCpp_example1 with SQLiteCpp |
25 |
| -target_link_libraries(SQLiteCpp_Example SQLiteCpp) |
| 13 | + |
| 14 | +# Add SQLite3 C++ wrapper around sqlite3 library (and sqlite3 itself provided for ease of use) |
| 15 | +# Here you can set CMake variables to avoid building Example, as well as cpplint, cppcheck... |
| 16 | +# or set them in the cmake command line (see for instance provided build.bat/build.sh scripts) |
| 17 | +set(SQLITECPP_RUN_CPPCHECK OFF CACHE BOOL "" FORCE) |
| 18 | +set(SQLITECPP_RUN_CPPLINT OFF CACHE BOOL "" FORCE) |
| 19 | +add_subdirectory(../.. SQLiteCpp) # out-of-source build requires explicit subdir name for compilation artifacts |
| 20 | + |
| 21 | +# Add main.cpp example source code to the executable |
| 22 | +add_executable(SQLiteCpp_Example src/main.cpp) |
| 23 | + |
| 24 | +# Link SQLiteCpp_example1 with SQLiteCpp |
| 25 | +target_link_libraries(SQLiteCpp_Example SQLiteCpp) |
0 commit comments