Skip to content

Commit bf5f62e

Browse files
Merge branch 'SRombauts:master' into master
2 parents a9c2bea + 9ec14de commit bf5f62e

File tree

5 files changed

+7659
-2957
lines changed

5 files changed

+7659
-2957
lines changed

CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#
55
# Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt
66
# or copy at http://opensource.org/licenses/MIT)
7-
cmake_minimum_required(VERSION 3.5)
7+
cmake_minimum_required(VERSION 3.5...4.0)
88
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") # custom CMake modules like FindSQLiteCpp
99
project(SQLiteCpp VERSION 3.3.3)
1010

@@ -473,7 +473,11 @@ if (SQLITECPP_BUILD_EXAMPLES)
473473

474474
target_link_libraries(SQLiteCpp_example1 SQLiteCpp)
475475
if (MSYS OR MINGW)
476-
target_link_libraries(SQLiteCpp_example1 ssp)
476+
# Check if libssp exists before linking (newer MinGW versions may not have it)
477+
find_library(SSP_LIBRARY ssp)
478+
if (SSP_LIBRARY)
479+
target_link_libraries(SQLiteCpp_example1 ${SSP_LIBRARY})
480+
endif ()
477481
endif ()
478482
else (SQLITECPP_BUILD_EXAMPLES)
479483
message(STATUS "SQLITECPP_BUILD_EXAMPLES OFF")

examples/example2/CMakeLists.txt

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
# Example CMake file for compiling & linking a project with the the SQLiteCpp wrapper
2-
#
3-
# Copyright (c) 2012-2023 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-
10-
# SQLiteC++ 3.x now requires C++11 compiler
11-
set(CMAKE_CXX_STANDARD 11)
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-
set(SQLITECPP_USE_STATIC_RUNTIME OFF CACHE BOOL "" FORCE)
20-
add_subdirectory(../.. SQLiteCpp) # out-of-source build requires explicit subdir name for compilation artifacts
21-
22-
# Add main.cpp example source code to the executable
23-
add_executable(SQLiteCpp_Example src/main.cpp)
24-
25-
# Link SQLiteCpp_example1 with SQLiteCpp
26-
target_link_libraries(SQLiteCpp_Example SQLiteCpp)
1+
# Example CMake file for compiling & linking a project with the the SQLiteCpp wrapper
2+
#
3+
# Copyright (c) 2012-2023 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.5...4.0)
8+
project(SQLiteCpp_Example VERSION 2.0)
9+
10+
# SQLiteC++ 3.x now requires C++11 compiler
11+
set(CMAKE_CXX_STANDARD 11)
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+
set(SQLITECPP_USE_STATIC_RUNTIME OFF CACHE BOOL "" FORCE)
20+
add_subdirectory(../.. SQLiteCpp) # out-of-source build requires explicit subdir name for compilation artifacts
21+
22+
# Add main.cpp example source code to the executable
23+
add_executable(SQLiteCpp_Example src/main.cpp)
24+
25+
# Link SQLiteCpp_example1 with SQLiteCpp
26+
target_link_libraries(SQLiteCpp_Example SQLiteCpp)

sqlite3/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ sqlite3
33

44
Copyright (c) 2012-2025 Sebastien Rombauts ([email protected])
55

6-
"sqlite3.c" and "sqlite3.h" files from sqlite-amalgamation-3490200.zip (SQLite 3.49.2 2025-05-07)
6+
"sqlite3.c" and "sqlite3.h" files from sqlite-amalgamation-3510100.zip (SQLite 3.51.1 2025-11-28)
77

88
Those files are provided for easy setup and compatibility under Windows/Linux/MacOS.
99
They are used by default by the CMake build.

0 commit comments

Comments
 (0)