Skip to content
This repository was archived by the owner on Nov 20, 2020. It is now read-only.

Commit 21d97fe

Browse files
author
kapec
committed
first commit
0 parents  commit 21d97fe

File tree

229 files changed

+134909
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

229 files changed

+134909
-0
lines changed

CMakeLists.txt

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
# Copyright (C) 2007-2011 LuaDist.
2+
# Created by Peter Kapec
3+
# Redistribution and use of this file is allowed according to the terms of the MIT license.
4+
# For details see the COPYRIGHT file distributed with LuaDist.
5+
# Please note that the package source code is licensed under its own license.
6+
7+
# IMPORTANT !!!! Files opcode.h, opcode.c, parse.h, parse.c were manualy generated...
8+
9+
# Project
10+
PROJECT(sqlite C)
11+
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
12+
INCLUDE(dist.cmake)
13+
14+
# Macros
15+
MACRO(ADD_PREFIX prefix rootlist)
16+
SET(outlist )
17+
FOREACH(root ${${rootlist}})
18+
LIST(APPEND outlist ${prefix}${root})
19+
ENDFOREACH(root)
20+
SET(${rootlist} ${outlist})
21+
ENDMACRO(ADD_PREFIX)
22+
23+
# SQLite configuration
24+
INCLUDE(CheckFunctionExists)
25+
26+
CHECK_FUNCTION_EXISTS("usleep" HAVE_USLEEP)
27+
IF(HAVE_USLEEP)
28+
ADD_DEFINITIONS(-DHAVE_USLEEP=1)
29+
ENDIF()
30+
31+
FIND_PACKAGE(Threads)
32+
IF(Threads_FOUND)
33+
IF(CMAKE_USE_PTHREADS_INIT)
34+
ADD_DEFINITIONS(-DTHREADSAFE=1)
35+
SET(EXTRA_LIBS ${CMAKE_THREAD_LIBS_INIT})
36+
ENDIF()
37+
ENDIF()
38+
39+
# Leave MEMORY_DEBUG undefined for maximum speed. Use MEMORY_DEBUG=1
40+
# to check for memory leaks. Use MEMORY_DEBUG=2 to print a log of all
41+
# malloc()s and free()s in order to track down memory leaks.
42+
#
43+
# ADD_DEFINITIONS(-DMEMORY_DEBUG=1)
44+
45+
# SQLite uses some expensive assert() statements in the inner loop.
46+
# You can make the library go almost twice as fast if you compile
47+
# with -DNDEBUG=1
48+
ADD_DEFINITIONS(-DNDEBUG=1)
49+
50+
FIND_PACKAGE(Readline)
51+
IF(READLINE_FOUND)
52+
INCLUDE_DIRECTORIES(${READLINE_INCLUDE_DIRS})
53+
ENDIF()
54+
55+
#### Should the database engine assume text is coded as UTF-8 or iso8859?
56+
#
57+
# ENCODING = UTF8 or ISO8859
58+
ADD_DEFINITIONS(-DENCODING=ISO8859)
59+
60+
61+
INCLUDE(CheckTypeSize)
62+
CHECK_TYPE_SIZE("char*" SQLITE_PTR_SZ VARIABLE)
63+
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
64+
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
65+
66+
SET(VERS "2.8.17")
67+
SET(ENCODING "ISO8859")
68+
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/sqlite.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/sqlite.h)
69+
70+
# SQLite Library
71+
INCLUDE_DIRECTORIES(. src)
72+
73+
SET(SQLITE_SRCS
74+
attach.c auth.c btree.c btree_rb.c build.c copy.c date.c delete.c
75+
expr.c func.c hash.c insert.c
76+
main.c opcodes.c os.c pager.c parse.c pragma.c printf.c random.c
77+
select.c table.c tokenize.c trigger.c update.c util.c
78+
vacuum.c vdbe.c vdbeaux.c where.c
79+
)
80+
ADD_PREFIX("src/" SQLITE_SRCS)
81+
82+
83+
ADD_LIBRARY(sqlite SHARED ${SQLITE_SRCS} sqlite.def)
84+
IF(CMAKE_USE_PTHREADS_INIT)
85+
TARGET_LINK_LIBRARIES(sqlite ${EXTRA_LIBS})
86+
ENDIF()
87+
88+
INSTALL(TARGETS sqlite RUNTIME DESTINATION ${INSTALL_BIN} LIBRARY DESTINATION ${INSTALL_LIB} ARCHIVE DESTINATION ${INSTALL_LIB})
89+
90+
# SQLite client
91+
ADD_EXECUTABLE(sqlite-app src/shell.c)
92+
SET_TARGET_PROPERTIES(sqlite-app PROPERTIES OUTPUT_NAME sqlite CLEAN_DIRECT_OUTPUT 1 )
93+
TARGET_LINK_LIBRARIES(sqlite-app sqlite)
94+
IF(READLINE_LIBRARIES)
95+
TARGET_LINK_LIBRARIES(sqlite-app ${READLINE_LIBRARIES})
96+
ENDIF()
97+
INSTALL(TARGETS sqlite-app RUNTIME DESTINATION ${INSTALL_BIN} LIBRARY DESTINATION ${INSTALL_LIB} ARCHIVE DESTINATION ${INSTALL_LIB})
98+
99+
# Install Headers
100+
INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/sqlite.h DESTINATION ${INSTALL_INC})
101+

CVS/Entries

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
D/art////
2+
D/doc////
3+
D/src////
4+
D/test////
5+
D/tool////
6+
D/www////
7+
/Makefile.in/1.87/Sat Apr 23 22:43:23 2005//Tversion_2
8+
/Makefile.linux-gcc/1.1/Sat Apr 23 22:43:23 2005//Tversion_2
9+
/README/1.6/Sat Apr 23 22:43:23 2005//Tversion_2
10+
/aclocal.m4/1.3/Sat Apr 23 22:43:23 2005//Tversion_2
11+
/config.guess/1.3/Sat Apr 23 22:43:23 2005//Tversion_2
12+
/config.sub/1.3/Sat Apr 23 22:43:23 2005//Tversion_2
13+
/configure/1.21/Sat Apr 23 22:43:23 2005//Tversion_2
14+
/configure.ac/1.7/Sat Apr 23 22:43:23 2005//Tversion_2
15+
/install-sh/1.1/Sat Apr 23 22:43:23 2005//Tversion_2
16+
/ltmain.sh/1.3/Sat Apr 23 22:43:23 2005//Tversion_2
17+
/main.mk/1.22.2.1/Sat Apr 23 22:43:23 2005//Tversion_2
18+
/publish.sh/1.21.2.6/Sat Apr 23 22:43:23 2005//Tversion_2
19+
/spec.template/1.3/Sat Apr 23 22:43:22 2005//Tversion_2
20+
/sqlite.1/1.3/Sat Apr 23 22:43:23 2005//Tversion_2
21+
/sqlite.def/1.2/Sat Apr 23 22:43:22 2005//Tversion_2
22+
/sqlite.pc.in/1.1/Sat Apr 23 22:43:23 2005//Tversion_2
23+
/VERSION/1.114.2.4/Mon Dec 19 17:38:14 2005//Tversion_2

CVS/Repository

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sqlite

CVS/Root

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
:pserver:[email protected]:/sqlite

CVS/Tag

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Tversion_2

FindReadline.cmake

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# - Try to find Readline
2+
# Once done this will define
3+
# READLINE_FOUND - System has readline
4+
# READLINE_INCLUDE_DIRS - The readline include directories
5+
# READLINE_LIBRARIES - The libraries needed to use readline
6+
# READLINE_DEFINITIONS - Compiler switches required for using readline
7+
8+
find_package ( PkgConfig )
9+
pkg_check_modules ( PC_READLINE readline )
10+
set ( READLINE_DEFINITIONS ${PC_READLINE_CFLAGS_OTHER} )
11+
12+
find_path ( READLINE_INCLUDE_DIR readline/readline.h
13+
HINTS ${PC_READLINE_INCLUDEDIR} ${PC_READLINE_INCLUDE_DIRS}
14+
PATH_SUFFIXES readline )
15+
16+
find_library ( READLINE_LIBRARY NAMES readline
17+
HINTS ${PC_READLINE_LIBDIR} ${PC_READLINE_LIBRARY_DIRS} )
18+
19+
set ( READLINE_LIBRARIES ${READLINE_LIBRARY} )
20+
set ( READLINE_INCLUDE_DIRS ${READLINE_INCLUDE_DIR} )
21+
22+
include ( FindPackageHandleStandardArgs )
23+
# handle the QUIETLY and REQUIRED arguments and set READLINE_FOUND to TRUE
24+
# if all listed variables are TRUE
25+
find_package_handle_standard_args ( readline DEFAULT_MSG READLINE_LIBRARIES READLINE_INCLUDE_DIRS )

0 commit comments

Comments
 (0)