-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
62 lines (52 loc) · 1.63 KB
/
CMakeLists.txt
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
if ((CMAKE_MAJOR_VERSION LESS 3) OR (CMAKE_VERSION VERSION_LESS "3.0.2"))
message(FATAL_ERROR "CMake >= 3.0.2 is required")
endif()
if (NOT DEFINED CMAKE_INSTALL_LIBDIR)
set(CMAKE_INSTALL_LIBDIR "lib")
endif()
#SOURCE SETS
set(TDDB_SOURCE
td/db/binlog/Binlog.cpp
td/db/binlog/BinlogEvent.cpp
td/db/binlog/ConcurrentBinlog.cpp
td/db/binlog/detail/BinlogEventsBuffer.cpp
td/db/binlog/detail/BinlogEventsProcessor.cpp
td/db/SqliteConnectionSafe.cpp
td/db/SqliteDb.cpp
td/db/SqliteKeyValue.cpp
td/db/SqliteKeyValueAsync.cpp
td/db/SqliteStatement.cpp
td/db/TQueue.cpp
td/db/detail/RawSqliteDb.cpp
td/db/binlog/Binlog.h
td/db/binlog/BinlogEvent.h
td/db/binlog/BinlogHelper.h
td/db/binlog/BinlogInterface.h
td/db/binlog/ConcurrentBinlog.h
td/db/binlog/detail/BinlogEventsBuffer.h
td/db/binlog/detail/BinlogEventsProcessor.h
td/db/BinlogKeyValue.h
td/db/DbKey.h
td/db/KeyValueSyncInterface.h
td/db/SeqKeyValue.h
td/db/SqliteConnectionSafe.h
td/db/SqliteDb.h
td/db/SqliteKeyValue.h
td/db/SqliteKeyValueAsync.h
td/db/SqliteKeyValueSafe.h
td/db/SqliteStatement.h
td/db/TQueue.h
td/db/TsSeqKeyValue.h
td/db/detail/RawSqliteDb.h
)
add_library(tddb STATIC ${TDDB_SOURCE})
target_include_directories(tddb PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
target_link_libraries(tddb PUBLIC tdactor tdutils PRIVATE tdsqlite)
if (NOT CMAKE_CROSSCOMPILING)
add_executable(binlog_dump td/db/binlog/binlog_dump.cpp)
target_link_libraries(binlog_dump PRIVATE tddb)
endif()
install(TARGETS tddb EXPORT TdTargets
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
)