diff --git a/CMakeLists.txt b/CMakeLists.txt index 39ae044..1b97650 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -144,6 +144,7 @@ if ((NOT WIN32) OR VCPKG_TOOLCHAIN) find_package(directx-headers CONFIG REQUIRED) find_package(directxmath CONFIG REQUIRED) target_link_libraries(${PROJECT_NAME} PRIVATE Microsoft::DirectX-Headers Microsoft::DirectXMath) + target_compile_definitions(${PROJECT_NAME} PRIVATE USING_DIRECTX_HEADERS) endif() #--- Package diff --git a/DirectXTex/DirectXTex.h b/DirectXTex/DirectXTex.h index e66383f..ff5e92e 100644 --- a/DirectXTex/DirectXTex.h +++ b/DirectXTex/DirectXTex.h @@ -29,7 +29,7 @@ #include #endif #endif -#else +#else // !WIN32 #include #include #endif diff --git a/DirectXTex/DirectXTexP.h b/DirectXTex/DirectXTexP.h index 529a759..bb5a223 100644 --- a/DirectXTex/DirectXTexP.h +++ b/DirectXTex/DirectXTexP.h @@ -100,7 +100,12 @@ #include #include #elif (_WIN32_WINNT >= _WIN32_WINNT_WIN10) +#ifdef USING_DIRECTX_HEADERS +#include +#include +#else #include +#endif #include #else #include