Re: [hatari-devel] Windows cross compile build inconsistencies with SDL2

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


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



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/