Re: [hatari-devel] Windows cross compile build inconsistencies with SDL2 |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] Windows cross compile build inconsistencies with SDL2
- From: Thomas Huth <th.huth@xxxxxxxxx>
- Date: Fri, 2 Apr 2021 13:17:14 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1617362239; bh=tXV6a/nXDYIVMU6frwbBTkPtq2qUiYazuZWsO+Ez4D0=; h=Date:From:To:Subject:From; b=nl0u+kQilbGIY47B00+G0NUeIV+6iWGCKN9iyGN6gL+QfHewf4g+MT9FpsYahaCtr NJrHIFsYzqFk9K1aQFfWzoj9yLm91hKzr8hyO+hBD21DJsAmGm6vcSACHFhZHIrpJv 8XbNW9DEHgI0LQaD+34Ki/m0nGy7TsPw27jXhl8hGrng1j9K0y97KuuAKceeUfufA2 ej7WZrGb4+H56zRHyEMHi+GbIXzM3/KUuT6rNoTGbX4Ix9kKo9Qgllf2O5FCUyFVoI rE1aM/4P8rNfLJG1Mt0u59vuW9EuusVtUAdndi68q0GVmX2WUOWEarDuUXtDXLfBu+ 5477Ls2F0O4Nw==
Am Fri, 2 Apr 2021 12:09:30 +0200
schrieb Jens Guenther <dbotw@xxxxxxx>:
> On Fri, 2 Apr 2021 10:48:44 +0200 Thomas Huth <th.huth@xxxxxxxxx>
> wrote:
>
> > I've also moved the extra CFLAGS to the src folder since that's the
> > only place where we link with the SDL library, so hopefully that
> > should fix the problem with main vs. SDL_main vs. WinMain, too.
>
> Still fails on native MinGW-w64
What failure do you exactly get?
> - the following patch fixes the build
> here:
>
> diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
> index 1ecbe614..51de5012 100644
> --- a/src/CMakeLists.txt
> +++ b/src/CMakeLists.txt
> @@ -73,7 +73,9 @@ if(CapsImage_FOUND)
> endif(CapsImage_FOUND)
>
> if(SDL2_OTHER_CFLAGS)
> - add_definitions(${SDL2_OTHER_CFLAGS})
> + if(NOT MINGW)
> + add_definitions(${SDL2_OTHER_CFLAGS})
> + endif()
Hmm, that can't be the solution either. IIRC I once added the whole
stuff with the "other cflags" to fix compilation problems on Windows...
But looking twice, I wonder whether we need this at all anymore. SDL2
is supposed to also work without the SDL_main hacks that were required
for SDL1 ... maybe we could simply drop this completely now?
Thomas