build/cmake: set appropriate CRT linkage for windows

This commit is contained in:
Adrien Béraud committed 2025-06-16 09:07:37 -04:00
1 parent e1885a17d9
commit 0f69153900
1 file changed
+3
+3
View File
@@ -607,6 +607,9 @@ if (OPENDHT_C)
target_compile_definitions(opendht-c PRIVATE OPENDHT_C_BUILD)
target_link_libraries(opendht-c PRIVATE opendht)
set_target_properties (opendht-c PROPERTIES SOVERSION ${opendht_VERSION_MAJOR} VERSION ${opendht_VERSION})
if(NOT BUILD_SHARED_LIBS)
set_target_properties(opendht-c PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
endif()
install (TARGETS opendht-c DESTINATION ${CMAKE_INSTALL_LIBDIR} EXPORT opendht-c)
# PkgConfig module