diff --git a/src/base/CMakeLists.txt b/src/base/CMakeLists.txt index 85cd53281..dfe835d9d 100644 --- a/src/base/CMakeLists.txt +++ b/src/base/CMakeLists.txt @@ -90,6 +90,7 @@ add_library(base-lib ${BASE_SOURCES}) target_link_libraries(base-lib modp_b64) if(WIN32) + add_definitions(-D_CRT_SECURE_NO_WARNINGS) target_link_libraries(base-lib dbghelp shlwapi) else() find_library(DL_LIBRARY NAMES dl) diff --git a/src/config.h b/src/config.h index 26d45e7db..0e35456ff 100644 --- a/src/config.h +++ b/src/config.h @@ -14,7 +14,9 @@ // In MSVC #ifdef _MSC_VER // Avoid warnings about insecure standard C++ functions + #ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS + #endif // Disable warning C4355 in MSVC: 'this' used in base member initializer list #pragma warning(disable:4355) diff --git a/src/doc/CMakeLists.txt b/src/doc/CMakeLists.txt index 7dc6a1afe..e43f6dafb 100644 --- a/src/doc/CMakeLists.txt +++ b/src/doc/CMakeLists.txt @@ -1,5 +1,9 @@ # Aseprite Document Library -# Copyright (C) 2001-2015 David Capello +# Copyright (C) 2001-2016 David Capello + +if(WIN32) + add_definitions(-D_CRT_SECURE_NO_WARNINGS) +endif() add_library(doc-lib algo.cpp diff --git a/src/ui/CMakeLists.txt b/src/ui/CMakeLists.txt index 3da091608..b787daf80 100644 --- a/src/ui/CMakeLists.txt +++ b/src/ui/CMakeLists.txt @@ -1,5 +1,9 @@ # ASEPRITE -# Copyright (C) 2001-2015 David Capello +# Copyright (C) 2001-2016 David Capello + +if(WIN32) + add_definitions(-D_CRT_SECURE_NO_WARNINGS) +endif() add_library(ui-lib accelerator.cpp