diff --git a/CMakeLists.txt b/CMakeLists.txt index ee03addb3..f70411d6e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,7 +41,7 @@ SET(hiredis_sources SET(hiredis_sources ${hiredis_sources}) IF(WIN32) - ADD_COMPILE_DEFINITIONS(_CRT_SECURE_NO_WARNINGS WIN32_LEAN_AND_MEAN) + SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /D_CRT_SECURE_NO_WARNINGS /DWIN32_LEAN_AND_MEAN") ENDIF() ADD_LIBRARY(hiredis SHARED ${hiredis_sources}) @@ -113,9 +113,12 @@ if (MSVC) INSTALL(FILES $ DESTINATION ${CMAKE_INSTALL_BINDIR} CONFIGURATIONS Debug RelWithDebInfo) - INSTALL(FILES $/$.pdb + INSTALL(FILES $/$${CMAKE_DEBUG_POSTFIX}.pdb DESTINATION ${CMAKE_INSTALL_LIBDIR} - CONFIGURATIONS Debug RelWithDebInfo) + CONFIGURATIONS Debug) + INSTALL(FILES $/$${CMAKE_RELEASE_POSTFIX}.pdb + DESTINATION ${CMAKE_INSTALL_LIBDIR} + CONFIGURATIONS RelWithDebInfo Release) endif() # For NuGet packages @@ -206,9 +209,12 @@ IF(ENABLE_SSL) INSTALL(FILES $ DESTINATION ${CMAKE_INSTALL_BINDIR} CONFIGURATIONS Debug RelWithDebInfo) - INSTALL(FILES $/$.pdb + INSTALL(FILES $/$${CMAKE_DEBUG_POSTFIX}.pdb DESTINATION ${CMAKE_INSTALL_LIBDIR} - CONFIGURATIONS Debug RelWithDebInfo) + CONFIGURATIONS Debug) + INSTALL(FILES $/$${CMAKE_RELEASE_POSTFIX}.pdb + DESTINATION ${CMAKE_INSTALL_LIBDIR} + CONFIGURATIONS RelWithDebInfo Release) endif() INSTALL(FILES hiredis_ssl.h