1061da546Spatrickif ( CMAKE_SYSTEM_NAME MATCHES "Windows" OR CMAKE_SYSTEM_NAME MATCHES "NetBSD" ) 2061da546Spatrick list(APPEND extra_libs lldbHost) 3061da546Spatrickendif () 4061da546Spatrick 5061da546Spatrickif (HAVE_LIBPTHREAD) 6061da546Spatrick list(APPEND extra_libs pthread) 7061da546Spatrickendif () 8061da546Spatrick 9061da546Spatrick 10061da546Spatrickif(APPLE) 11061da546Spatrick configure_file( 12061da546Spatrick ${CMAKE_CURRENT_SOURCE_DIR}/lldb-vscode-Info.plist.in 13061da546Spatrick ${CMAKE_CURRENT_BINARY_DIR}/lldb-vscode-Info.plist 14061da546Spatrick ) 15061da546Spatrick # Inline info plist in binary (use target_link_options for this as soon as CMake 3.13 is available) 16061da546Spatrick set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-sectcreate,__TEXT,__info_plist,${CMAKE_CURRENT_BINARY_DIR}/lldb-vscode-Info.plist") 17061da546Spatrickendif() 18061da546Spatrick 19061da546Spatrick# We need to include the llvm components we depend on manually, as liblldb does 20061da546Spatrick# not re-export those. 21061da546Spatrickset(LLVM_LINK_COMPONENTS Support) 22dda28197Spatrickset(LLVM_TARGET_DEFINITIONS Options.td) 23dda28197Spatricktablegen(LLVM Options.inc -gen-opt-parser-defs) 24dda28197Spatrickadd_public_tablegen_target(LLDBVSCodeOptionsTableGen) 25061da546Spatrickadd_lldb_tool(lldb-vscode 26061da546Spatrick lldb-vscode.cpp 27061da546Spatrick BreakpointBase.cpp 28061da546Spatrick ExceptionBreakpoint.cpp 29*be691f3bSpatrick FifoFiles.cpp 30061da546Spatrick FunctionBreakpoint.cpp 31061da546Spatrick IOStream.cpp 32061da546Spatrick JSONUtils.cpp 33061da546Spatrick LLDBUtils.cpp 34*be691f3bSpatrick OutputRedirector.cpp 35*be691f3bSpatrick ProgressEvent.cpp 36*be691f3bSpatrick RunInTerminal.cpp 37061da546Spatrick SourceBreakpoint.cpp 38061da546Spatrick VSCode.cpp 39061da546Spatrick 40061da546Spatrick LINK_LIBS 41061da546Spatrick liblldb 42061da546Spatrick ${extra_libs} 43061da546Spatrick 44061da546Spatrick LINK_COMPONENTS 45dda28197Spatrick Option 46061da546Spatrick Support 47061da546Spatrick ) 48061da546Spatrick 49061da546Spatrickif(LLDB_BUILD_FRAMEWORK) 50061da546Spatrick # In the build-tree, we know the exact path to the framework directory. 51061da546Spatrick # The installed framework can be in different locations. 52061da546Spatrick lldb_setup_rpaths(lldb-vscode 53061da546Spatrick BUILD_RPATH 54061da546Spatrick "${LLDB_FRAMEWORK_ABSOLUTE_BUILD_DIR}" 55061da546Spatrick INSTALL_RPATH 56061da546Spatrick "@loader_path/../../../SharedFrameworks" 57061da546Spatrick "@loader_path/../../System/Library/PrivateFrameworks" 58061da546Spatrick "@loader_path/../../Library/PrivateFrameworks" 59061da546Spatrick ) 60061da546Spatrickendif() 61