2021-06-13 22:38:48 +02:00
|
|
|
if ((CMAKE_MAJOR_VERSION LESS 3) OR (CMAKE_VERSION VERSION_LESS "3.0.2"))
|
|
|
|
message(FATAL_ERROR "CMake >= 3.0.2 is required")
|
|
|
|
endif()
|
2018-12-31 20:04:05 +01:00
|
|
|
|
2020-01-24 01:03:18 +01:00
|
|
|
if (NOT DEFINED CMAKE_INSTALL_LIBDIR)
|
|
|
|
set(CMAKE_INSTALL_LIBDIR "lib")
|
|
|
|
endif()
|
|
|
|
|
2018-12-31 20:04:05 +01:00
|
|
|
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
|
|
|
|
|
2023-12-29 12:09:50 +01:00
|
|
|
td/db/detail/RawSqliteDb.cpp
|
|
|
|
|
2019-10-03 19:15:15 +02:00
|
|
|
td/db/SqliteConnectionSafe.cpp
|
2018-12-31 20:04:05 +01:00
|
|
|
td/db/SqliteDb.cpp
|
2018-07-22 01:56:40 +02:00
|
|
|
td/db/SqliteKeyValue.cpp
|
2018-12-31 20:04:05 +01:00
|
|
|
td/db/SqliteKeyValueAsync.cpp
|
2019-10-03 19:15:15 +02:00
|
|
|
td/db/SqliteStatement.cpp
|
2019-08-07 13:01:22 +02:00
|
|
|
td/db/TQueue.cpp
|
2018-12-31 20:04:05 +01:00
|
|
|
|
|
|
|
td/db/binlog/Binlog.h
|
|
|
|
td/db/binlog/BinlogEvent.h
|
|
|
|
td/db/binlog/BinlogHelper.h
|
2019-10-03 19:15:15 +02:00
|
|
|
td/db/binlog/BinlogInterface.h
|
2018-12-31 20:04:05 +01:00
|
|
|
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
|
2019-08-07 13:01:22 +02:00
|
|
|
td/db/TQueue.h
|
2018-12-31 20:04:05 +01:00
|
|
|
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()
|
|
|
|
|
2023-10-14 02:05:01 +02:00
|
|
|
install(TARGETS tddb EXPORT TdStaticTargets
|
2020-01-24 00:01:07 +01:00
|
|
|
LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
|
|
|
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
|
2018-12-31 20:04:05 +01:00
|
|
|
)
|