File tree Expand file tree Collapse file tree 4 files changed +22
-5
lines changed Expand file tree Collapse file tree 4 files changed +22
-5
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_LIST_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 @@ -98,7 +98,6 @@ target_include_directories(xrRenderPC_R4
9898 "${CMAKE_SOURCE_DIR} /sdk/include/nvapi"
9999 "${CMAKE_SOURCE_DIR} /Externals/AGS_SDK"
100100 "${CMAKE_SOURCE_DIR} /Externals/AGS_SDK/ags_lib/inc"
101- "${CMAKE_SOURCE_DIR} /src/packages/directxtex_desktop_2019.2024.10.29.1/include"
102101)
103102
104103target_link_libraries (xrRenderPC_R4
@@ -126,12 +125,8 @@ if (MSVC)
126125 set (_xr_ags_release_lib "${CMAKE_SOURCE_DIR} /Externals/AGS_SDK/ags_lib/lib/amd_ags_x86_2019_MD.lib" )
127126 endif ()
128127
129- set (_xr_dxtex_root "${CMAKE_SOURCE_DIR} /src/packages/directxtex_desktop_2019.2024.10.29.1/native/lib/${_xr_dxtex_arch} " )
130-
131128 target_link_libraries (xrRenderPC_R4
132129 PRIVATE
133- $<$<CONFIG:Debug>:${_xr_dxtex_root} /Debug/DirectXTex.lib>
134- $<$<NOT :$<CONFIG:Debug>>:${_xr_dxtex_root} /Release/DirectXTex.lib>
135130 ${_xr_nvapi_lib}
136131 $<$<CONFIG:Debug>:${_xr_ags_debug_lib} >
137132 $<$<NOT :$<CONFIG:Debug>>:${_xr_ags_release_lib} >
@@ -151,6 +146,8 @@ target_compile_definitions(xrRenderPC_R4
151146
152147set_target_properties (xrRenderPC_R4 PROPERTIES
153148 PREFIX ""
149+ VS_USER_PROPS ${XRAY_MSBUILD_PROPS}
150+ VS_PACKAGE_REFERENCES "directxmath_2024.10.15.1;directxtex_desktop_2019_2024.10.29.1"
154151)
155152
156153target_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