Skip to content

Commit 159538e

Browse files
committed
cmake - add _d debug postfix for libraries on Windows
1 parent a62a4bb commit 159538e

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

cmake/CMakeLists.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,12 @@ message(STATUS "INCLUDEDIR: ${INCLUDEDIR}")
173173

174174
set(IFCOPENSHELL_EXPORT_TARGETS "${PROJECT_NAME}Targets")
175175

176+
# On Windows Release and Debug binaries are not compatible.
177+
# So we add a postfix to avoid issues and allow release and debug installations to coexist.
178+
if(WIN32)
179+
set(CMAKE_DEBUG_POSTFIX "_d")
180+
endif()
181+
176182
if(BUILD_SHARED_LIBS)
177183
add_definitions(-DIFC_SHARED_BUILD)
178184
if(MSVC)

0 commit comments

Comments
 (0)