2020-02-12 09:32:12 +08:00
|
|
|
cmake_minimum_required(VERSION 3.2)
|
2020-02-11 20:25:31 +08:00
|
|
|
|
2020-02-23 20:13:34 +08:00
|
|
|
project(tars-cpp)
|
2018-09-05 11:26:21 +08:00
|
|
|
|
2020-02-25 10:14:27 +08:00
|
|
|
#-------------------------------------------------------------------
|
2020-02-16 20:17:52 +08:00
|
|
|
|
2020-02-25 10:14:27 +08:00
|
|
|
if("${TARS_CPP_COMMON}" STREQUAL "")
|
|
|
|
|
|
|
|
set(TARS_CPP_COMMON "1")
|
|
|
|
|
|
|
|
include("${PROJECT_SOURCE_DIR}/cmake/Common.cmake")
|
|
|
|
|
|
|
|
include("${PROJECT_SOURCE_DIR}/cmake/BuildTarsCpp.cmake")
|
|
|
|
|
|
|
|
include("${PROJECT_SOURCE_DIR}/cmake/Thirdparty.cmake")
|
|
|
|
|
|
|
|
include("${PROJECT_SOURCE_DIR}/cmake/ParseAsm.cmake")
|
|
|
|
|
|
|
|
endif()
|
|
|
|
|
2020-04-01 20:29:29 +08:00
|
|
|
set(CLEAR_INCLUDE "clear-install.cmake")
|
|
|
|
FILE(WRITE ${CLEAR_INCLUDE} "EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} -E remove_directory ${CMAKE_INSTALL_PREFIX}/include)\n")
|
|
|
|
install(SCRIPT ${CLEAR_INCLUDE})
|
|
|
|
|
2020-02-25 10:14:27 +08:00
|
|
|
#-------------------------------------------------------------------
|
|
|
|
|
|
|
|
include_directories(${PROJECT_SOURCE_DIR}/util/include)
|
2020-03-04 16:24:17 +08:00
|
|
|
|
2020-02-25 10:14:27 +08:00
|
|
|
include_directories(${PROJECT_SOURCE_DIR}/servant)
|
|
|
|
include_directories(${PROJECT_SOURCE_DIR}/servant/protocol)
|
|
|
|
|
|
|
|
IF(WIN32)
|
2020-03-12 19:30:10 +08:00
|
|
|
include_directories(${PROJECT_SOURCE_DIR}/util/src/epoll_windows)
|
2020-02-25 10:14:27 +08:00
|
|
|
ENDIF()
|
|
|
|
|
|
|
|
add_subdirectory(util)
|
|
|
|
add_subdirectory(tools)
|
|
|
|
add_subdirectory(servant)
|
|
|
|
add_subdirectory(examples)
|
|
|
|
|
|
|
|
#add_subdirectory(test_deprecated)
|
2020-02-23 20:13:34 +08:00
|
|
|
|
2020-02-20 09:16:49 +08:00
|
|
|
|