Skip to content

Commit

Permalink
[directxmath] Fix to support MSBuild usage (#42485)
Browse files Browse the repository at this point in the history
  • Loading branch information
walbourn authored Dec 3, 2024
1 parent 1f53e17 commit 3aa4bf7
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 3 deletions.
43 changes: 43 additions & 0 deletions ports/directxmath/include-path-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
From 994441ebfa63fe1440bf430c99b5ba3eaba02c66 Mon Sep 17 00:00:00 2001
From: Chuck Walbourn <chuckw@microsoft.com>
Date: Tue, 26 Nov 2024 17:44:02 -0800
Subject: [PATCH] CMake update to avoid directxmath subdir for include

---
CMakeLists.txt | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d10adc1..7041f14 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -30,7 +30,7 @@ add_library(${PROJECT_NAME} INTERFACE)

target_include_directories(${PROJECT_NAME} INTERFACE
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/Inc>
- $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}/directxmath>)
+ $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>)

target_compile_features(${PROJECT_NAME} INTERFACE cxx_std_11)

@@ -61,7 +61,7 @@ install(EXPORT ${PROJECT_NAME}-targets
DESTINATION ${CMAKE_INSTALL_DATAROOTDIR}/${PACKAGE_NAME})

install(FILES ${LIBRARY_HEADERS}
- DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/directxmath)
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})

install(FILES
${CMAKE_CURRENT_BINARY_DIR}/${PACKAGE_NAME}-config.cmake
@@ -71,7 +71,7 @@ install(FILES
# Create pkg-config file
include(build/JoinPaths.cmake)
# from: https://github.com/jtojnar/cmake-snips#concatenating-paths-when-building-pkg-config-files
-join_paths(DIRECTXMATH_INCLUDEDIR_FOR_PKG_CONFIG "\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}/directxmath")
+join_paths(DIRECTXMATH_INCLUDEDIR_FOR_PKG_CONFIG "\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}")
join_paths(DIRECTXMATH_LIBDIR_FOR_PKG_CONFIG "\${prefix}" "${CMAKE_INSTALL_LIBDIR}")

configure_file(
--
2.47.0.vfs.0.3

3 changes: 2 additions & 1 deletion ports/directxmath/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ vcpkg_from_github(
REF oct2024
SHA512 501a3c8b51cd6d3d4fbcc511c2c37f1d0511bd84d546d5254c2bc81238c11242b9d62c7a153ee110dc9d96a0c7d2544428d8de832c943b680b0cb09d8e3760f2
HEAD_REF main
PATCHES include-path-fix.patch
)

vcpkg_cmake_configure(
Expand All @@ -27,7 +28,7 @@ if(NOT VCPKG_TARGET_IS_WINDOWS)

file(INSTALL
${DOWNLOADS}/sal.h
DESTINATION ${CURRENT_PACKAGES_DIR}/include/directxmath)
DESTINATION ${CURRENT_PACKAGES_DIR}/include)
endif()

file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug")
Expand Down
2 changes: 1 addition & 1 deletion ports/directxmath/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "directxmath",
"version-date": "2024-10-15",
"version-date": "2024-12-02",
"description": "DirectXMath SIMD C++ math library",
"homepage": "https://github.com/Microsoft/DirectXMath",
"documentation": "https://docs.microsoft.com/windows/win32/dxmath/directxmath-portal",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2321,7 +2321,7 @@
"port-version": 0
},
"directxmath": {
"baseline": "2024-10-15",
"baseline": "2024-12-02",
"port-version": 0
},
"directxmesh": {
Expand Down
5 changes: 5 additions & 0 deletions versions/d-/directxmath.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "bf54dfb76f186cf9b58dfe7d06150667ec54babc",
"version-date": "2024-12-02",
"port-version": 0
},
{
"git-tree": "b842f51d9302c1c46491b4481947be89005c3936",
"version-date": "2024-10-15",
Expand Down

0 comments on commit 3aa4bf7

Please sign in to comment.