2017-01-10 16:02:33 +00:00
|
|
|
cmake_minimum_required(VERSION 3.5)
|
2018-09-27 18:59:15 +00:00
|
|
|
project(teleport)
|
2017-01-10 16:02:33 +00:00
|
|
|
|
2018-09-27 18:59:15 +00:00
|
|
|
MESSAGE(STATUS "operation system is ${CMAKE_SYSTEM}")
|
|
|
|
MESSAGE(STATUS "current source directory is ${CMAKE_CURRENT_SOURCE_DIR}")
|
|
|
|
|
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${teleport_SOURCE_DIR}/../out/server/x64/bin")
|
|
|
|
|
|
|
|
set(CMAKE_CONFIGURATION_TYPES Debug Release)
|
|
|
|
|
|
|
|
# Determine the platform.
|
|
|
|
if("${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin")
|
|
|
|
MESSAGE(STATUS "build on macOS...")
|
|
|
|
set(OS_MACOS 1)
|
|
|
|
set(OS_POSIX 1)
|
|
|
|
set(TP_EXTERNAL_RELEASE_DIR "${teleport_SOURCE_DIR}/../external/macos/release")
|
|
|
|
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux")
|
|
|
|
set(OS_LINUX 1)
|
|
|
|
set(OS_POSIX 1)
|
|
|
|
MESSAGE(STATUS "build on Linux...")
|
|
|
|
add_subdirectory(tp_web/src)
|
|
|
|
set(TP_EXTERNAL_RELEASE_DIR "${teleport_SOURCE_DIR}/../external/linux/release")
|
|
|
|
elseif("${CMAKE_SYSTEM_NAME}" STREQUAL "Windows")
|
|
|
|
MESSAGE(FATAL_ERROR "unsupported platform: Windows")
|
|
|
|
else()
|
|
|
|
MESSAGE(FATAL_ERROR "unsupported platform: ${CMAKE_SYSTEM_NAME}")
|
|
|
|
endif()
|
2017-09-13 13:33:49 +00:00
|
|
|
|
2017-01-11 12:04:11 +00:00
|
|
|
add_subdirectory(tp_core/core)
|
2017-01-11 15:24:21 +00:00
|
|
|
add_subdirectory(tp_core/protocol/ssh)
|
2018-04-08 09:28:17 +00:00
|
|
|
add_subdirectory(tp_core/protocol/telnet)
|
2018-03-19 14:57:23 +00:00
|
|
|
#add_subdirectory(testssh/testssh)
|
2017-11-24 15:28:38 +00:00
|
|
|
|
2018-09-27 18:59:15 +00:00
|
|
|
if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/tp_core/protocol/rdp")
|
2017-11-24 15:28:38 +00:00
|
|
|
add_subdirectory(tp_core/protocol/rdp)
|
2018-09-27 18:59:15 +00:00
|
|
|
endif()
|
2017-12-13 15:22:42 +00:00
|
|
|
|