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)