Define _CRT_SECURE_NO_WARNINGS on sub-libraries that need it

This commit is contained in:
David Capello 2016-03-03 19:22:52 -03:00
parent 7b06b74715
commit 285deb603e
4 changed files with 13 additions and 2 deletions

View File

@ -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)

View File

@ -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)

View File

@ -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

View File

@ -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