From 5103eb303977ea79d8f7b687272737adf9ffe237 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 4 Mar 2021 18:42:51 +0100 Subject: [PATCH] meson.build: compile Win32Main.cxx only on Windows --- meson.build | 7 ++++++- src/win32/Win32Main.cxx | 5 ----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/meson.build b/meson.build index 2dbbc9b4a..0b0c78921 100644 --- a/meson.build +++ b/meson.build @@ -272,7 +272,6 @@ sources = [ 'src/LogInit.cxx', 'src/ls.cxx', 'src/Instance.cxx', - 'src/win32/Win32Main.cxx', 'src/MusicBuffer.cxx', 'src/MusicPipe.cxx', 'src/MusicChunk.cxx', @@ -320,6 +319,12 @@ sources = [ 'src/PlaylistFile.cxx', ] +if is_windows + sources += [ + 'src/win32/Win32Main.cxx', + ] +endif + if not is_android sources += [ 'src/CommandLine.cxx', diff --git a/src/win32/Win32Main.cxx b/src/win32/Win32Main.cxx index f3b356bc0..81a2b274f 100644 --- a/src/win32/Win32Main.cxx +++ b/src/win32/Win32Main.cxx @@ -18,9 +18,6 @@ */ #include "Main.hxx" - -#ifdef _WIN32 - #include "util/Compiler.h" #include "Instance.hxx" #include "system/FatalError.hxx" @@ -155,5 +152,3 @@ void win32_app_stopping() else running.store(false); } - -#endif