aboutsummaryrefslogtreecommitdiffstats
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorGraham Bloice <graham.bloice@trihedral.com>2014-06-20 22:59:29 +0100
committerGraham Bloice <graham.bloice@trihedral.com>2014-06-20 22:05:50 +0000
commitdc5d0ed0bc3e836ca8c25f01c8d30eb881d1c097 (patch)
treeee4c9be3052f278ba83602f3e16820404c6ab1d6 /CMakeLists.txt
parentb3885a9387ab4490cfce9d8aabc00c15a83424c2 (diff)
Add flags required for VS2013 to Cmake
Change-Id: I666d819fdee67d945dd46bd03749f190eb2873b4 Reviewed-on: https://code.wireshark.org/review/2499 Reviewed-by: Graham Bloice <graham.bloice@trihedral.com> Tested-by: Graham Bloice <graham.bloice@trihedral.com>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 215e8084f2..721bf2208c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -163,6 +163,23 @@ if( CMAKE_C_COMPILER_ID MATCHES "MSVC")
# NOMINMAX keeps windows.h from defining "min" and "max" via windef.h.
# This avoids conflicts with the C++ standard library.
/DNOMINMAX
+ # -DPSAPI_VERSION=1 Programs that must run on earlier versions of Windows as well as Windows 7 and later
+ # versions should always call this function as GetProcessMemoryInfo. To ensure correct
+ # resolution of symbols, add Psapi.lib to the TARGETLIBS macro and compile the program
+ # with -DPSAPI_VERSION=1.To use run-time dynamic linking, load Psapi.dll.
+ # http://msdn.microsoft.com/en-us/library/windows/desktop/ms683219(v=vs.85).aspx
+ # -DBUILD_WINDOWS Starting from VS2013, GetVersionEx is deprecated and we are recommended to use
+ # VerifyVersionInfo instead
+ # http://msdn.microsoft.com/en-us/library/windows/desktop/ms724429(v=vs.85).aspx
+ # http://msdn.microsoft.com/en-us/library/windows/desktop/ms725491(v=vs.85).aspx
+ # To continue to use GetVersionEx, we can define BUILD_WINDOWS
+ # -D_ALLOW_KEYWORD_MACROS For VS2012 onwards the, C++ STL does not permit macro redefinitions of keywords
+ # (see http://msdn.microsoft.com/en-us/library/bb531344(v=vs.110).aspx)
+ # This definition prevents the complaint about the redefinition of inline by WinPCap
+ # in pcap-stdinc.h when compiling CPP files, e.g. the QT UI
+ /DPSAPI_VERSION=1
+ /DBUILD_WINDOWS
+ /D_ALLOW_KEYWORD_MACROS
)
if(NOT WIN64)