From 9481bc6e615494735ef3fc99f6a4951bf4f3b84b Mon Sep 17 00:00:00 2001 From: Dan Paulat Date: Mon, 20 Nov 2023 05:43:35 -0600 Subject: [PATCH] Use -D instead of /D for MSVC compiler definitions - No effect with MSVC - Resource compiler (supercell-wx target) fails with /D --- scwx-qt/scwx-qt.cmake | 4 ++-- wxdata/wxdata.cmake | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scwx-qt/scwx-qt.cmake b/scwx-qt/scwx-qt.cmake index 4f107883..787382a3 100644 --- a/scwx-qt/scwx-qt.cmake +++ b/scwx-qt/scwx-qt.cmake @@ -464,8 +464,8 @@ target_compile_options(supercell-wx PRIVATE if (MSVC) # Don't include Windows macros - target_compile_options(scwx-qt PRIVATE /D "NOMINMAX") - target_compile_options(supercell-wx PRIVATE /D "NOMINMAX") + target_compile_options(scwx-qt PRIVATE -DNOMINMAX) + target_compile_options(supercell-wx PRIVATE -DNOMINMAX) # Enable multi-processor compilation target_compile_options(scwx-qt PRIVATE "/MP") diff --git a/wxdata/wxdata.cmake b/wxdata/wxdata.cmake index 91dc192a..f0507326 100644 --- a/wxdata/wxdata.cmake +++ b/wxdata/wxdata.cmake @@ -250,7 +250,7 @@ target_compile_options(wxdata PRIVATE if (MSVC) # Don't include Windows macros - target_compile_options(wxdata PRIVATE /D "NOMINMAX") + target_compile_options(wxdata PRIVATE -DNOMINMAX) # Enable multi-processor compilation target_compile_options(wxdata PRIVATE "/MP")