CMakeLists.txt 984 字节
Newer Older
1
cmake_minimum_required(VERSION 3.0)
H
refact  
Hongze Cheng 已提交
2 3 4 5 6 7 8

project(
    TDengine
    VERSION 3.0
    DESCRIPTION "An open-source big data platform designed and optimized for the Internet of Things(IOT)"
)

wafwerar's avatar
wafwerar 已提交
9
if (NOT DEFINED TD_SOURCE_DIR)
wafwerar's avatar
wafwerar 已提交
10
  set( TD_SOURCE_DIR ${PROJECT_SOURCE_DIR} )
wafwerar's avatar
wafwerar 已提交
11
endif()
12

wafwerar's avatar
wafwerar 已提交
13 14 15 16 17 18 19
set(TD_SUPPORT_DIR "${TD_SOURCE_DIR}/cmake")
set(TD_CONTRIB_DIR "${TD_SOURCE_DIR}/contrib")

include(${TD_SUPPORT_DIR}/cmake.platform)
include(${TD_SUPPORT_DIR}/cmake.define)
include(${TD_SUPPORT_DIR}/cmake.options)
include(${TD_SUPPORT_DIR}/cmake.version)
H
refact  
Hongze Cheng 已提交
20

H
Hongze Cheng 已提交
21 22
# contrib
add_subdirectory(contrib)
H
refact  
Hongze Cheng 已提交
23

H
Hongze Cheng 已提交
24 25
set_property(GLOBAL PROPERTY GLOBAL_DEPENDS_NO_CYCLES OFF)

H
refact  
Hongze Cheng 已提交
26
# api
H
Hongze Cheng 已提交
27 28
add_library(api INTERFACE)
target_include_directories(api INTERFACE "include/client")
H
refact  
Hongze Cheng 已提交
29

H
refact  
Hongze Cheng 已提交
30
# src
H
more  
Hongze Cheng 已提交
31 32 33 34
if(${BUILD_TEST})
    include(CTest)
    enable_testing()
endif(${BUILD_TEST})
35

H
refact  
Hongze Cheng 已提交
36
add_subdirectory(source)
S
Shengliang Guan 已提交
37
add_subdirectory(tools)
38
add_subdirectory(utils)
39
add_subdirectory(examples/c)
H
Hongze Cheng 已提交
40
include(${TD_SUPPORT_DIR}/cmake.install)
H
refact  
Hongze Cheng 已提交
41

H
Hongze Cheng 已提交
42
# docs 
H
Hongze Cheng 已提交
43
add_subdirectory(docs/doxgen)