diff --git a/Common/CmdLineHelpers.h b/Common/CmdLineHelpers.h index 1e5d8e23..b3af3ee5 100644 --- a/Common/CmdLineHelpers.h +++ b/Common/CmdLineHelpers.h @@ -23,6 +23,10 @@ #include #include +#ifndef TOOL_VERSION +#error Define TOOL_VERSION before including this header +#endif + namespace Helpers { @@ -164,7 +168,7 @@ namespace Helpers if (!*version || wcscmp(version, L"1.0.0.0") == 0) { - swprintf_s(version, L"%03d (library)", DIRECTX_TEX_VERSION); + swprintf_s(version, L"%03d (library)", TOOL_VERSION); } if (versionOnly) diff --git a/Texassemble/texassemble.cpp b/Texassemble/texassemble.cpp index 86e4c71b..91a9f543 100644 --- a/Texassemble/texassemble.cpp +++ b/Texassemble/texassemble.cpp @@ -75,6 +75,7 @@ #include "DirectXTexPNG.h" #endif +#define TOOL_VERSION DIRECTX_TEX_VERSION #include "CmdLineHelpers.h" using namespace Helpers; diff --git a/Texconv/texconv.cpp b/Texconv/texconv.cpp index feae09aa..e096cc13 100644 --- a/Texconv/texconv.cpp +++ b/Texconv/texconv.cpp @@ -81,6 +81,7 @@ #include "DirectXTexXbox.h" #endif +#define TOOL_VERSION DIRECTX_TEX_VERSION #include "CmdLineHelpers.h" using namespace Helpers; diff --git a/Texdiag/texdiag.cpp b/Texdiag/texdiag.cpp index cdbafdd3..c8a8e214 100644 --- a/Texdiag/texdiag.cpp +++ b/Texdiag/texdiag.cpp @@ -71,6 +71,7 @@ #include "DirectXTexPNG.h" #endif +#define TOOL_VERSION DIRECTX_TEX_VERSION #include "CmdLineHelpers.h" using namespace Helpers;