2013-09-25 18:37:32 +08:00
|
|
|
include_directories(.)
|
|
|
|
|
2015-10-09 11:40:55 +08:00
|
|
|
set(lldbBase_SOURCES
|
|
|
|
lldb.cpp
|
|
|
|
)
|
|
|
|
|
2020-10-13 23:13:23 +08:00
|
|
|
|
|
|
|
find_first_existing_vc_file("${LLDB_SOURCE_DIR}" lldb_vc)
|
2016-09-24 07:33:52 +08:00
|
|
|
|
2019-02-06 11:51:00 +08:00
|
|
|
set(version_inc "${CMAKE_CURRENT_BINARY_DIR}/VCSVersion.inc")
|
2021-09-17 00:27:53 +08:00
|
|
|
set(generate_vcs_version_script "${LLVM_CMAKE_DIR}/GenerateVersionFromVCS.cmake")
|
2016-09-24 07:33:52 +08:00
|
|
|
|
2020-01-17 08:04:08 +08:00
|
|
|
if(lldb_vc AND LLVM_APPEND_VC_REV)
|
2019-02-06 11:51:00 +08:00
|
|
|
set(lldb_source_dir ${LLDB_SOURCE_DIR})
|
2019-01-31 15:12:43 +08:00
|
|
|
endif()
|
2019-01-31 14:47:10 +08:00
|
|
|
|
2019-02-06 11:51:00 +08:00
|
|
|
add_custom_command(OUTPUT "${version_inc}"
|
|
|
|
DEPENDS "${lldb_vc}" "${generate_vcs_version_script}"
|
|
|
|
COMMAND ${CMAKE_COMMAND} "-DNAMES=LLDB"
|
2020-01-17 08:04:08 +08:00
|
|
|
"-DLLDB_SOURCE_DIR=${lldb_source_dir}"
|
2019-02-06 11:51:00 +08:00
|
|
|
"-DHEADER_FILE=${version_inc}"
|
|
|
|
-P "${generate_vcs_version_script}")
|
|
|
|
|
|
|
|
# Mark the generated header as being generated.
|
|
|
|
set_source_files_properties("${version_inc}"
|
|
|
|
PROPERTIES GENERATED TRUE
|
|
|
|
HEADER_FILE_ONLY TRUE)
|
|
|
|
|
|
|
|
list(APPEND lldbBase_SOURCES ${version_inc})
|
|
|
|
|
2019-04-18 02:23:22 +08:00
|
|
|
if(LLDB_VERSION_STRING)
|
2016-11-11 07:56:32 +08:00
|
|
|
set_property(SOURCE lldb.cpp APPEND PROPERTY
|
|
|
|
COMPILE_DEFINITIONS "LLDB_VERSION_STRING=${LLDB_VERSION_STRING}")
|
2016-11-11 01:33:19 +08:00
|
|
|
endif()
|
|
|
|
|
2015-03-19 00:56:24 +08:00
|
|
|
add_lldb_library(lldbBase
|
2015-10-09 11:40:55 +08:00
|
|
|
${lldbBase_SOURCES}
|
2015-03-19 00:56:24 +08:00
|
|
|
)
|
|
|
|
|
2013-09-25 18:37:32 +08:00
|
|
|
add_subdirectory(Breakpoint)
|
|
|
|
add_subdirectory(Commands)
|
|
|
|
add_subdirectory(Core)
|
|
|
|
add_subdirectory(DataFormatters)
|
|
|
|
add_subdirectory(Expression)
|
|
|
|
add_subdirectory(Host)
|
2015-03-20 06:00:21 +08:00
|
|
|
add_subdirectory(Initialization)
|
2013-09-25 18:37:32 +08:00
|
|
|
add_subdirectory(Interpreter)
|
|
|
|
add_subdirectory(Plugins)
|
|
|
|
add_subdirectory(Symbol)
|
|
|
|
add_subdirectory(Target)
|
|
|
|
add_subdirectory(Utility)
|
|
|
|
|
2015-03-20 06:00:21 +08:00
|
|
|
# Build API last. Since liblldb needs to link against every other target, it needs
|
|
|
|
# those targets to have already been created.
|
2015-03-19 00:56:24 +08:00
|
|
|
add_subdirectory(API)
|