From 39b56ac598fa1fe0d3e56690c131b398b068fc7d Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Mon, 28 Aug 2017 15:24:02 +0800 Subject: [PATCH] Move NOMINMAX define --- cmake/Modules/winconf.cmake | 1 + src/CMakeLists.txt | 3 --- src/src.pro | 2 -- winconf.pri | 1 + 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/cmake/Modules/winconf.cmake b/cmake/Modules/winconf.cmake index 7dc7907bd..6976657f8 100644 --- a/cmake/Modules/winconf.cmake +++ b/cmake/Modules/winconf.cmake @@ -24,6 +24,7 @@ add_definitions(-DUNICODE -D_WIN32_IE=0x0501 -D_CRT_SECURE_NO_DEPRECATE -D_SCL_SECURE_NO_DEPRECATE + -DNOMINMAX ) # and boost set(Boost_USE_STATIC_LIBS True) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4c8f38d31..fc08356ce 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -42,9 +42,6 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}) add_definitions(-DQT_NO_CAST_TO_ASCII) # Efficient construction for QString & QByteArray (Qt >= 4.8) add_definitions(-DQT_USE_QSTRINGBUILDER) -if (WIN32) - add_definitions(-DNOMINMAX) -endif (WIN32) if (NOT GUI) add_definitions(-DDISABLE_GUI -DDISABLE_COUNTRIES_RESOLUTION) diff --git a/src/src.pro b/src/src.pro index 2d2b698f1..cdddc7386 100644 --- a/src/src.pro +++ b/src/src.pro @@ -60,8 +60,6 @@ DEFINES += QT_NO_CAST_TO_ASCII # Efficient construction for QString & QByteArray (Qt >= 4.8) DEFINES += QT_USE_QSTRINGBUILDER -win32: DEFINES += NOMINMAX - INCLUDEPATH += $$PWD include(app/app.pri) diff --git a/winconf.pri b/winconf.pri index ca36e0a92..dcec302ca 100644 --- a/winconf.pri +++ b/winconf.pri @@ -49,6 +49,7 @@ DEFINES += _CRT_SECURE_NO_DEPRECATE DEFINES += _SCL_SECURE_NO_DEPRECATE DEFINES += __USE_W32_SOCKETS DEFINES += _FILE_OFFSET_BITS=64 +DEFINES += NOMINMAX CONFIG(debug, debug|release) { DEFINES += TORRENT_DEBUG