CMakeLists.txt 644 字节
Newer Older
H
more  
Hongze Cheng 已提交
1
# for tdb
H
refact  
Hongze Cheng 已提交
2
set(TDB_SUBDIRS "db")
H
Hongze Cheng 已提交
3 4 5 6
foreach(TDB_SUBDIR ${TDB_SUBDIRS})
    aux_source_directory("src/${TDB_SUBDIR}" TDB_SRC)
endforeach()

H
refact  
Hongze Cheng 已提交
7
add_library(tdb STATIC ${TDB_SRC})
H
Hongze Cheng 已提交
8

H
refact  
Hongze Cheng 已提交
9
target_include_directories(
H
refact  
Hongze Cheng 已提交
10
    tdb
H
refact  
Hongze Cheng 已提交
11 12
    PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/inc"
    PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/src/inc"
H
Hongze Cheng 已提交
13 14
)
target_link_libraries(
H
refact  
Hongze Cheng 已提交
15
    tdb
H
Hongze Cheng 已提交
16
    PUBLIC os
H
Hongze Cheng 已提交
17
    PUBLIC util
H
more  
Hongze Cheng 已提交
18 19
)

H
more  
Hongze Cheng 已提交
20 21 22 23 24 25 26 27 28 29
# for tdb_sqlite
add_library(tdb_sqlite "")
target_sources(tdb_sqlite
    PRIVATE
    "src/sqlite/pcache.c"
    "src/sqlite/pcache1.c"
)
target_include_directories(tdb_sqlite PUBLIC "src/sqliteinc")

# for test
H
more  
Hongze Cheng 已提交
30
if(${BUILD_TEST})
H
Hongze Cheng 已提交
31
    add_subdirectory(test)
H
more  
Hongze Cheng 已提交
32
endif(${BUILD_TEST})