Added a "sqlite3/CMakeLists.txt" file defining the SQLite3 static library for easier Windows build.

This commit is contained in:
Sébastien Rombauts 2013-09-01 17:30:54 +02:00
parent d75c7a9449
commit 2b5d66eb25
2 changed files with 15 additions and 3 deletions

View File

@ -9,9 +9,9 @@ cmake_minimum_required (VERSION 2.6)
project (SQLiteCpp) project (SQLiteCpp)
if (MSVC) 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") 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 # disable Visual Studio warnings for fopen() used in the example
add_definitions (/D_CRT_SECURE_NO_WARNINGS) add_definitions (/D_CRT_SECURE_NO_WARNINGS)
elseif (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX) 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 () 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) add_subdirectory (src)
include_directories ("${PROJECT_SOURCE_DIR}/src") include_directories ("${PROJECT_SOURCE_DIR}/src")
################################################################################ ################################################################################

12
sqlite3/CMakeLists.txt Normal file
View File

@ -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
)