diff --git a/CMakeLists.txt b/CMakeLists.txt index f0153213..3b105e37 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -103,7 +103,10 @@ endforeach() ### Define the mandatory libraries. # Build the webpdecoder library. -if(NOT MSVC) +if(MSVC) + # avoid security warnings for e.g., fopen() used in the examples. + add_definitions(-D_CRT_SECURE_NO_WARNINGS) +else() add_definitions(-Wall) endif() include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${WEBP_DEP_INCLUDE_DIRS})