Re-add UNICODE and _UNICODE defines for MSVC

This commit is contained in:
RElesgoe 2017-12-17 01:15:57 -08:00 committed by GitHub
parent abe0cf8f2c
commit a4afc108ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -211,7 +211,13 @@ check_mkdir_args(MKDIR_TAKES_ONE_ARG)
configure_file(config.h.cmake ${CMAKE_CURRENT_BINARY_DIR}/config.h)
# new VS.Net deprecates with warnings most of ISO C functions without this
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE)
endif(MSVC)
if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "MSVC")
# using Visual Studio
add_definitions(
-D_CRT_SECURE_NO_DEPRECATE
-D_CRT_NONSTDC_NO_DEPRECATE
-DUNICODE
-D_UNICODE
)
endif()