From 98f4113abe03c639be2f0f6fc1ebf6575d3cc7c2 Mon Sep 17 00:00:00 2001 From: Chuck Walbourn Date: Fri, 16 Jun 2023 12:16:03 -0700 Subject: [PATCH] CMake targets fixes for optional vs. required packages (#174) --- build/DirectXTK12-config.cmake.in | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build/DirectXTK12-config.cmake.in b/build/DirectXTK12-config.cmake.in index c18430ee..f71a11f7 100644 --- a/build/DirectXTK12-config.cmake.in +++ b/build/DirectXTK12-config.cmake.in @@ -4,8 +4,11 @@ include(${CMAKE_CURRENT_LIST_DIR}/@PROJECT_NAME@-targets.cmake) include(CMakeFindDependencyMacro) if(MINGW) - find_dependency(directx-headers CONFIG) - find_dependency(directxmath CONFIG) + find_dependency(directx-headers) + find_dependency(directxmath) +else() + find_package(directx-headers CONFIG QUIET) + find_package(directxmath CONFIG QUIET) endif() check_required_components("@PROJECT_NAME@")