diff --git a/CMake/NPMInstall.cmake b/CMake/NPMInstall.cmake index 28a93f96d8665534a5a4ec0fd094b632d4e2e43c..973caea918ecc903ae95b046677ec51d29497ca1 100644 --- a/CMake/NPMInstall.cmake +++ b/CMake/NPMInstall.cmake @@ -69,13 +69,13 @@ function(npm_install NPM_PACKAGE_SPECIFICATION) get_filename_component(NPM_BINARY_DIR "${CMAKE_CURRENT_BINARY_DIR}" REALPATH) add_custom_target(copy_src_public ALL SOURCES "public" "src" COMMENT "Copying src and public directory into build directory") - add_custom_target(download_npm_dependencies ALL SOURCES "node_modules" "package-lock.json" DEPENDS copy_src_public COMMENT "Attempt downloading of required npm dependencies") + add_custom_target(download_npm_dependencies ALL SOURCES "node_modules" "package-lock.json" DEPENDS copy_src_public package_json COMMENT "Attempt downloading of required npm dependencies") add_custom_target(packing_javascript_files ALL SOURCES build COMMENT "Attempt packing of javascript files") add_custom_target(start_development_server_${PACKAGE_NAME} SOURCES "node_modules" "package-lock.json" COMMENT "Start start_development_server for ${PACKAGE_NAME}") add_custom_command( - OUTPUT "package.json" - COMMAND ${CMAKE_COMMAND} -E copy_if_different + OUTPUT package_json + COMMAND ${CMAKE_COMMAND} -E copy_if_different ${JSON_PACKAGE_SPECIFICATION} ${NPM_BINARY_DIR}/package.json COMMENT "Copying package.json")