From 159538e2bb9b33784f7010018b460769c4bb000a Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Fri, 12 Dec 2025 13:27:34 +0500 Subject: [PATCH] cmake - add `_d` debug postfix for libraries on Windows --- cmake/CMakeLists.txt | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 10ef70ea56..0f71a00b1d 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -173,6 +173,12 @@ message(STATUS "INCLUDEDIR: ${INCLUDEDIR}") set(IFCOPENSHELL_EXPORT_TARGETS "${PROJECT_NAME}Targets") +# On Windows Release and Debug binaries are not compatible. +# So we add a postfix to avoid issues and allow release and debug installations to coexist. +if(WIN32) + set(CMAKE_DEBUG_POSTFIX "_d") +endif() + if(BUILD_SHARED_LIBS) add_definitions(-DIFC_SHARED_BUILD) if(MSVC)