1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-02 18:42:15 +00:00
nixpkgs/pkgs/misc/vscode-extensions/vscode-lldb/cmake-build-extension-only.patch

45 lines
1.4 KiB
Diff

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -9,13 +9,6 @@ include(cmake/CopyFiles.cmake)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_INSTALL_PREFIX $ENV{HOME}/.vscode/extensions/vscode-lldb CACHE PATH "Install location")
-set(LLDB_ROOT $ENV{LLDB_ROOT} CACHE PATH "Root of LLDB build directory")
-if (LLDB_ROOT)
- message("Using LLDB from ${LLDB_ROOT}")
-else()
- message(FATAL_ERROR "LLDB_ROOT not set." )
-endif()
-
# General OS-specific definitions
if (${CMAKE_SYSTEM_NAME} STREQUAL "Linux")
set(DylibPrefix lib)
@@ -64,8 +57,9 @@ set(UpdateFile ${CMAKE_COMMAND} -E copy_if_different)
# Adapter
-add_subdirectory(adapter)
-add_subdirectory(lldb)
+add_custom_target(adapter)
+add_custom_target(lldb)
+add_custom_target(codelldb)
# Extension package content
@@ -74,16 +68,6 @@ configure_file(package.json ${CMAKE_CURRENT_BINARY_DIR}/package.json @ONLY)
configure_file(webpack.config.js ${CMAKE_CURRENT_BINARY_DIR}/webpack.config.js @ONLY)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/package-lock.json DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
-# Run 'npm install'
-execute_process(
- COMMAND ${NPM} install
- WORKING_DIRECTORY ${CMAKE_BINARY_DIR}
- RESULT_VARIABLE Result
-)
-if (NOT ${Result} EQUAL 0)
- message(FATAL_ERROR "npm intall failed: ${Result}")
-endif()
-
# Copy it back, so we can commit the lock file.
file(COPY ${CMAKE_CURRENT_BINARY_DIR}/package-lock.json DESTINATION ${CMAKE_CURRENT_SOURCE_DIR})