From 751c9ef620a0813c86c199045a8b2be081a8c94f Mon Sep 17 00:00:00 2001 From: Ray Molenkamp Date: Wed, 27 Sep 2023 18:03:16 -0600 Subject: [PATCH] CMake/MSVC: Fix build error for RelWithDebInfo configuration CMake decided to link the Debug libs for MaterialX because no specific RelWithDebInfo configuration was provided, strange default imho but not difficult to fix. --- build_files/cmake/platform/platform_win32.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake index 7a5997e6d6e..6efb768cb8f 100644 --- a/build_files/cmake/platform/platform_win32.cmake +++ b/build_files/cmake/platform/platform_win32.cmake @@ -991,6 +991,8 @@ endif() if(WITH_MATERIALX) include("${LIBDIR}/MaterialX/lib/cmake/MaterialX/MaterialXTargets.cmake") + set_target_properties(MaterialXCore PROPERTIES MAP_IMPORTED_CONFIG_RELWITHDEBINFO RELEASE) + set_target_properties(MaterialXFormat PROPERTIES MAP_IMPORTED_CONFIG_RELWITHDEBINFO RELEASE) endif() if(WINDOWS_PYTHON_DEBUG)