Skip to content

Commit

Permalink
Make it possible to override NUGET_PACKAGES_PATH on command line
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
vadz authored and janwilmans committed Feb 22, 2024
1 parent f755471 commit 91d63ac
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmake/CMakeLists.nuget.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 91d63ac

Please sign in to comment.