xref: /llvm-project/lldb/tools/debugserver/CMakeLists.txt (revision cbaa3597aaf6273e66b3f445ed36a6458143fe6a)
1cmake_minimum_required(VERSION 3.20.0)
2
3project(Debugserver LANGUAGES C CXX ASM-ATT)
4
5# Must go below project(..)
6include(GNUInstallDirs)
7
8if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
9  set(LLDB_BUILT_STANDALONE TRUE)
10
11  set(CMAKE_MODULE_PATH
12    ${CMAKE_MODULE_PATH}
13    "${CMAKE_SOURCE_DIR}/../../cmake"
14    "${CMAKE_SOURCE_DIR}/../../cmake/modules"
15    )
16
17  include(LLDBStandalone)
18  include(debugserverConfig)
19  include(AddLLDB)
20
21  set(LLDB_SOURCE_DIR "${CMAKE_SOURCE_DIR}/../../")
22  include_directories(${LLDB_SOURCE_DIR}/include)
23endif()
24
25# debugserver contains ObjC++ code, so let's disable Clang modules
26# in this subdirectory to avoid building ObjC++ modules (which often
27# doesn't properly work).
28remove_module_flags()
29
30add_subdirectory(source)
31