aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorDeal <[email protected]>2023-09-26 10:53:20 +0800
committerGitHub <[email protected]>2023-09-26 02:53:20 +0000
commitd74dd7b2dc530c02e41e7a6331d422aacad9827b (patch)
tree0930c733ebaa08120e879affc5db51cf917d4beb /CMakeLists.txt
parentf4eb9282e52fa7d072fadf5ec1edc5d2d05ec4e8 (diff)
Make cppwinrt version configurable (#919)
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt4
1 files changed, 3 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 7a01eb9f..e0b6298f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1409,6 +1409,8 @@ else()
target_link_libraries(${IMPL_TARGET} PRIVATE alcommon ${LINKER_FLAGS} ${EXTRA_LIBS} ${MATH_LIB})
if(ALSOFT_UWP)
+ set(ALSOFT_CPPWINRT_VERSION "2.0.230706.1" CACHE STRING "The soft-oal default cppwinrt version")
+
find_program(NUGET_EXE NAMES nuget)
if(NOT NUGET_EXE)
message("NUGET.EXE not found.")
@@ -1416,7 +1418,7 @@ else()
endif()
exec_program(${NUGET_EXE}
- ARGS install "Microsoft.Windows.CppWinRT" -Version 2.0.230706.1 -ExcludeVersion -OutputDirectory "\"${CMAKE_BINARY_DIR}/packages\"")
+ ARGS install "Microsoft.Windows.CppWinRT" -Version ${ALSOFT_CPPWINRT_VERSION} -ExcludeVersion -OutputDirectory "\"${CMAKE_BINARY_DIR}/packages\"")
set_target_properties(${IMPL_TARGET} PROPERTIES
VS_PROJECT_IMPORT ${CMAKE_BINARY_DIR}/packages/Microsoft.Windows.CppWinRT/build/native/Microsoft.Windows.CppWinRT.props