aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoão Valverde <j@v6e.pt>2023-01-14 03:33:07 +0000
committerJoão Valverde <j@v6e.pt>2023-01-14 14:52:53 +0000
commit184a5676217e04695163d748f3de7a8ff9d04a9b (patch)
tree57f0f70cd5d7a65938c04064a763f305d65ed772
parentcdff6da68e5cb8f5de38951524d08665f39ede4e (diff)
CMake+Windows: Try to prevent symbol redefinitions again
-rw-r--r--CMakeLists.txt10
-rw-r--r--cmakeconfig.h.in16
2 files changed, 16 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2d5cb7f85b..6e17d64fd1 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -477,16 +477,6 @@ if(WIN32)
# This avoids conflicts with the C++ standard library.
#
-DNOMINMAX
- #
- # Make sure everyone is using the same API and that it's sufficient
- # for our needs.
- # This should match the following:
- # - The <compatibility><application> section in resources\wireshark.exe.manifest.in
- # - The GetWindowsVersion parts of packaging\nsis\wireshark.nsi
- # - The VersionNT parts of packaging\wix\Prerequisites.wxi
- #
- -DNTDDI_VERSION=NTDDI_WIN7
- -D_WIN32_WINNT=_WIN32_WINNT_WIN7
)
endif()
diff --git a/cmakeconfig.h.in b/cmakeconfig.h.in
index 1b60bc23ad..ab4d21c511 100644
--- a/cmakeconfig.h.in
+++ b/cmakeconfig.h.in
@@ -321,6 +321,22 @@
# ifndef __STDC__
# define __STDC__ 0
# endif
+
+/*
+ * Make sure everyone is using the same API and that it's sufficient
+ * for our needs.
+ * This should match the following:
+ * - The <compatibility><application> section in resources\wireshark.exe.manifest.in
+ * - The GetWindowsVersion parts of packaging\nsis\wireshark.nsi
+ * - The VersionNT parts of packaging\wix\Prerequisites.wxi
+ */
+# ifndef NTDDI_VERSION
+# define NTDDI_VERSION NTDDI_WIN7
+# endif
+
+# ifndef _WIN32_WINNT
+# define _WIN32_WINNT _WIN32_WINNT_WIN7
+# endif
#endif
#ifdef HAVE_PCRE2