From 91d63acfb73a814dce0f4d7cf896449f02dd60b5 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 21 Feb 2024 23:41:01 +0100 Subject: [PATCH] Make it possible to override NUGET_PACKAGES_PATH on command line When PackagesRoot is set to some global directory, nuget packages are installed in it and not under application-specific nuget directory, so using the default value of NUGET_PACKAGES_PATH didn't work and CMake configure step failed because it didn't find third-party packages files. Fix this by allowing to specify -DNUGET_PACKAGES_PATH=$PackagesRoot on CMake command line to override the default value. --- cmake/CMakeLists.nuget.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/CMakeLists.nuget.cmake b/cmake/CMakeLists.nuget.cmake index 2407bd8c..7427972b 100644 --- a/cmake/CMakeLists.nuget.cmake +++ b/cmake/CMakeLists.nuget.cmake @@ -6,7 +6,7 @@ else() execute_process(COMMAND ${CMAKE_SOURCE_DIR}/utils/nuget.exe restore ${NUGET_SOLUTION} COMMAND_ERROR_IS_FATAL ANY) endif() -set(NUGET_PACKAGES_PATH ${CMAKE_SOURCE_DIR}/application/nuget/packages) +set(NUGET_PACKAGES_PATH ${CMAKE_SOURCE_DIR}/application/nuget/packages CACHE PATH "Directory containing nuget packages") add_library(nuget_boost INTERFACE) target_include_directories(nuget_boost INTERFACE "${NUGET_PACKAGES_PATH}/boost.1.80.0/lib/native/include")