-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
129 lines (120 loc) · 3.66 KB
/
CMakeLists.txt
File metadata and controls
129 lines (120 loc) · 3.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
cmake_minimum_required(VERSION 3.0)
project(odb-sqlite)
set(ODBSQLITE_INCLUDE
odb/sqlite/auto-handle.hxx
odb/sqlite/binding.hxx
odb/sqlite/blob-stream.hxx
odb/sqlite/blob.hxx
odb/sqlite/connection-factory.hxx
odb/sqlite/connection.hxx
odb/sqlite/connection.ixx
odb/sqlite/container-statements.hxx
odb/sqlite/container-statements.txx
odb/sqlite/database.hxx
odb/sqlite/database.ixx
odb/sqlite/error.hxx
odb/sqlite/exceptions.hxx
odb/sqlite/forward.hxx
odb/sqlite/no-id-object-result.hxx
odb/sqlite/no-id-object-result.txx
odb/sqlite/no-id-object-statements.hxx
odb/sqlite/no-id-object-statements.txx
odb/sqlite/polymorphic-object-result.hxx
odb/sqlite/polymorphic-object-result.txx
odb/sqlite/polymorphic-object-statements.hxx
odb/sqlite/polymorphic-object-statements.txx
odb/sqlite/prepared-query.hxx
odb/sqlite/query-dynamic.hxx
odb/sqlite/query-dynamic.ixx
odb/sqlite/query-dynamic.txx
odb/sqlite/query.hxx
odb/sqlite/query.ixx
odb/sqlite/query.txx
odb/sqlite/section-statements.hxx
odb/sqlite/section-statements.txx
odb/sqlite/simple-object-result.hxx
odb/sqlite/simple-object-result.txx
odb/sqlite/simple-object-statements.hxx
odb/sqlite/simple-object-statements.ixx
odb/sqlite/simple-object-statements.txx
odb/sqlite/sqlite-types.hxx
odb/sqlite/statement-cache.hxx
odb/sqlite/statement-cache.txx
odb/sqlite/statement.hxx
odb/sqlite/statements-base.hxx
odb/sqlite/stream.hxx
odb/sqlite/text-stream.hxx
odb/sqlite/text.hxx
odb/sqlite/tracer.hxx
odb/sqlite/traits-calls.hxx
odb/sqlite/traits.hxx
odb/sqlite/transaction-impl.hxx
odb/sqlite/transaction-impl.ixx
odb/sqlite/transaction.hxx
odb/sqlite/transaction.ixx
odb/sqlite/version.hxx
odb/sqlite/view-result.hxx
odb/sqlite/view-result.txx
odb/sqlite/view-statements.hxx
odb/sqlite/view-statements.txx
odb/sqlite/details/config.hxx
odb/sqlite/details/conversion.hxx
odb/sqlite/details/export.hxx
odb/sqlite/details/options.hxx
odb/sqlite/details/options.ixx
)
if(WIN32)
set(ODB_INCLUDE
${ODB_INCLUDE}
odb/sqlite/details/config.h
)
ENDIF()
set(ODBSQLITE_SRC
odb/sqlite/connection.cxx
odb/sqlite/connection-factory.cxx
odb/sqlite/database.cxx
odb/sqlite/error.cxx
odb/sqlite/exceptions.cxx
odb/sqlite/prepared-query.cxx
odb/sqlite/query.cxx
odb/sqlite/query-dynamic.cxx
odb/sqlite/query-const-expr.cxx
odb/sqlite/simple-object-statements.cxx
odb/sqlite/statement.cxx
odb/sqlite/statements-base.cxx
odb/sqlite/statement-cache.cxx
odb/sqlite/stream.cxx
odb/sqlite/tracer.cxx
odb/sqlite/traits.cxx
odb/sqlite/transaction.cxx
odb/sqlite/transaction-impl.cxx
odb/sqlite/details/options.cxx
)
IF (UNIX)
set(ODBSQLITE_INCLUDE
${ODBSQLITE_INCLUDE}
odb/sqlite/details/config.h
)
ENDIF()
add_definitions(
-DLIBODB_SQLITE_HAVE_UNLOCK_NOTIFY
-DLIBODB_SQLITE_HAVE_COLUMN_METADATA
)
add_library(odb-sqlite ${ODBSQLITE_INCLUDE} ${ODBSQLITE_SRC})
target_link_libraries(odb-sqlite sqlite3 odb)
target_include_directories(odb-sqlite PUBLIC ${CMAKE_CURRENT_SOURCE_DIR})
if(BUILD_SHARED_LIBS)
target_compile_definitions(odb-sqlite
PUBLIC LIBODB_SQLITE_DYNAMIC_LIB DATABASE_SQLITE)
else()
target_compile_definitions(odb-sqlite
PUBLIC LIBODB_SQLITE_STATIC_LIB DATABASE_SQLITE)
endif()
set(ODBSQLITE_INCLUDE ${CMAKE_CURRENT_SOURCE_DIR} PARENT_SCOPE)
SET_TARGET_PROPERTIES(odb-sqlite
PROPERTIES
CXX_STANDARD 14
CXX_EXTENSIONS OFF
DEBUG_OUTPUT_NAME odb-sqlite-d
RELEASE_OUTPUT_NAME odb-sqlite
)