Skip to content

Commit 91d63ac

Browse files
vadzjanwilmans
authored andcommitted
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.
1 parent f755471 commit 91d63ac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmake/CMakeLists.nuget.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ else()
66
execute_process(COMMAND ${CMAKE_SOURCE_DIR}/utils/nuget.exe restore ${NUGET_SOLUTION} COMMAND_ERROR_IS_FATAL ANY)
77
endif()
88

9-
set(NUGET_PACKAGES_PATH ${CMAKE_SOURCE_DIR}/application/nuget/packages)
9+
set(NUGET_PACKAGES_PATH ${CMAKE_SOURCE_DIR}/application/nuget/packages CACHE PATH "Directory containing nuget packages")
1010

1111
add_library(nuget_boost INTERFACE)
1212
target_include_directories(nuget_boost INTERFACE "${NUGET_PACKAGES_PATH}/boost.1.80.0/lib/native/include")

0 commit comments

Comments
 (0)