File tree Expand file tree Collapse file tree 4 files changed +22
-0
lines changed Expand file tree Collapse file tree 4 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -51,6 +51,10 @@ else()
5151 message (FATAL_ERROR "Unsupported or unknown compiler." )
5252endif ()
5353
54+ # https://stackoverflow.com/questions/61909735/cmakes-vs-package-references-not-adding-a-reference-to-vs2017-project
55+ # https://stackoverflow.com/questions/2973263/add-visual-c-property-sheets-using-cmake
56+ set (XRAY_MSBUILD_PROPS "${CMAKE_CURRENT_SOURCE_DIR} /XRay.MSBuild.props" )
57+
5458if (WIN32 )
5559 include_directories ("${XRAY_SDK_INCLUDE_DIR} " )
5660 include_directories ("${XRAY_SDK_INCLUDE_DIR} /SDL2" )
Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" utf-8" ?>
2+ <Project ToolsVersion =" 4.0" xmlns =" http://schemas.microsoft.com/developer/msbuild/2003" >
3+ <ImportGroup Label =" PropertySheets" >
4+ <Import Project =" $(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition =" exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label =" LocalAppDataPlatform" />
5+ </ImportGroup >
6+ <ItemGroup Condition =" '$(MSBuildProjectExtension)' == '.vcxproj'" >
7+ <ProjectCapability Include =" PackageReferences" />
8+ </ItemGroup >
9+
10+ <PropertyGroup Condition =" '$(MSBuildProjectExtension)' == '.vcxproj'" >
11+ <NuGetTargetMoniker Condition =" '$(NuGetTargetMoniker)' == ''" >native,Version=v0.0</NuGetTargetMoniker >
12+ <RuntimeIdentifiers Condition =" '$(RuntimeIdentifiers)' == ''" >win;win-x86;win-x64;win-arm;win-arm64</RuntimeIdentifiers >
13+ </PropertyGroup >
14+ </Project >
Original file line number Diff line number Diff line change @@ -151,6 +151,8 @@ target_compile_definitions(xrRenderPC_R4
151151
152152set_target_properties (xrRenderPC_R4 PROPERTIES
153153 PREFIX ""
154+ VS_USER_PROPS ${XRAY_MSBUILD_PROPS}
155+ VS_PACKAGE_REFERENCES "directxmath_2024.10.15.1;directxtex_desktop_2019_2024.10.29.1"
154156)
155157
156158target_precompile_headers(xrRenderPC_R4
Original file line number Diff line number Diff line change @@ -513,6 +513,8 @@ endif()
513513
514514set_target_properties (xrCore PROPERTIES
515515 PREFIX ""
516+ VS_USER_PROPS ${XRAY_MSBUILD_PROPS}
517+ VS_PACKAGE_REFERENCES "sdl2.nuget_2.32.4;sdl2.nuget.redist_2.32.4"
516518)
517519
518520target_precompile_headers(xrCore
You can’t perform that action at this time.
0 commit comments