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: Sat, 3 Apr 2021 08:26:38 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017; t=1617431200; bh=75ZN4EWdlcrVgQO6gmSSgpT7XThI6O0M9mIci+DIqWg=; h=Date:From:To:Subject:From; b=d73aRZhMcAXO9cbjyEbRFkkY47l+nMnMqTO0cqayWtVgf0EyJqtPqAx1B+tqf+XTA +Q9soYTbOqEYh8sRhNEW1Or94LemavIIrAQMfzypDGEo6ORN8mue9y38W3zRcC6rMB rRWslI/9WwljqHIbfiRbYaivMmLyflNXWiMOHufVax9N6zr4PS8fMcUpK6PJF4Rtat LCa/2luW/OMN2dQd4hPCPO2z2LcNIzP7ggPuz4AmB9/tsM6X2Yy0NYOaGkkLdmYAS0 AZ1kP+jnVagd/cnkz+cQVyes4ERevV9/w1tWCcWfmMZ9sOpCwk1GnsgqQC9xaGA0Rv RTSbKqmtlEJwQ==
Am Fri, 2 Apr 2021 09:45:16 -0500
schrieb Chang Chong <codemonkey2x@xxxxxxxxx>:
> This is what I encountered during my first attempt at building Hatari
> on windows via msys/mingw (in addition to the pkg-config behavior i
> noted in a separate post). I added the SDL2_LIBRARY to the link
> dependencies to all the executables that failed (starting with
> build68k.exe) to resolve the missing symbols.
>
> Since the additional SDL2 other cflags is added in cmake via
> add_definitions, it’s applied to every file compilation. If the SDL2
> additional cflags is required for a specific target, rather than all
> files, perhaps we can use cmake's target_compile_definitions to make
> it explicit in the cmake code and build rules to apply these
> additional cflags to specific named targets.
The extra CFLAGS should only be required for the targets that already
link against SDL2, thus only the hatari executable. So let's give it a
try and use target_compile_definitions instead. I've committed the
corresponding change:
https://git.tuxfamily.org/hatari/hatari.git/commit/?id=3c821d0bfb
Could you please try whether it's working for you now?
If not, I think we really simply remove that extra cflags handling
stuff and hope that it now works without those with SDL2 everywhere.
Thomas