From 2b5d66eb252a951a29a74dde1eb949d19c809091 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Rombauts?= Date: Sun, 1 Sep 2013 17:30:54 +0200 Subject: [PATCH] Added a "sqlite3/CMakeLists.txt" file defining the SQLite3 static library for easier Windows build. --- CMakeLists.txt | 6 +++--- sqlite3/CMakeLists.txt | 12 ++++++++++++ 2 files changed, 15 insertions(+), 3 deletions(-) create mode 100644 sqlite3/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 36164ef..bfd2cdc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,9 +9,9 @@ cmake_minimum_required (VERSION 2.6) project (SQLiteCpp) if (MSVC) - # build the SQLite3 C library for windows build (for ease of use) + # build the SQLite3 C library for Windows (for ease of use) + add_subdirectory (sqlite3) include_directories ("${PROJECT_SOURCE_DIR}/sqlite3") - add_library (sqlite3 sqlite3/sqlite3.c sqlite3/sqlite3.h) # disable Visual Studio warnings for fopen() used in the example add_definitions (/D_CRT_SECURE_NO_WARNINGS) elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) @@ -20,7 +20,7 @@ elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) endif () ################################################################################ -# add the subdirectory containing the CMakeLists.txt of the library +# add the subdirectory containing the CMakeLists.txt of the wrapper library add_subdirectory (src) include_directories ("${PROJECT_SOURCE_DIR}/src") ################################################################################ diff --git a/sqlite3/CMakeLists.txt b/sqlite3/CMakeLists.txt new file mode 100644 index 0000000..1b2f85f --- /dev/null +++ b/sqlite3/CMakeLists.txt @@ -0,0 +1,12 @@ +# CMake file for compiling the sqlite3 static library under Windows (for ease of use) +# +# Copyright (c) 2013 Sebastien Rombauts (sebastien.rombauts@gmail.com) +# +# Distributed under the MIT License (MIT) (See accompanying file LICENSE.txt +# or copy at http://opensource.org/licenses/MIT) + +# add sources of the "sqlite3" static library +add_library (sqlite3 + sqlite3.c + sqlite3.h +)