From 3031300257f4cb044a652d2eac67ae0590b26b36 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Fri, 1 Nov 2024 13:55:48 -0700 Subject: [PATCH] Fix for CMake using MinGW --- CMakeLists.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 045d2874..daab6322 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -271,13 +271,14 @@ endif() if(MINGW) find_package(directxmath CONFIG REQUIRED) + target_link_libraries(${PROJECT_NAME} PUBLIC Microsoft::DirectXMath) else() find_package(directxmath CONFIG QUIET) endif() if(directxmath_FOUND) message(STATUS "Using DirectXMath package") - target_link_libraries(${PROJECT_NAME} PUBLIC Microsoft::DirectXMath) + target_link_libraries(${PROJECT_NAME} PRIVATE Microsoft::DirectXMath) endif() if(BUILD_XAUDIO_WIN7