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: Jens Guenther <dbotw@xxxxxxx>
- Date: Fri, 2 Apr 2021 12:09:30 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1617358172; bh=ZUGkGsTx77aMRTiqkp6nwOsiPww6WV8FMdrMK0+YSAo=; h=X-UI-Sender-Class:Date:From:To:Subject:In-Reply-To:References; b=O0si8WbNBntIklp/lR7XGZW49IlgkzspQp5nFEKOhxVkAhZDcS5JlGuVLVAsQc62t BGaH037gqV+qhk8WadIxSYdsUHn+K5llQBd/BFeAdYWkBwirv2et5mfHMzgYSEn6Ph EQv0LzJia/a0ll1xlJ6Q2rcyyxvVE5IUeFjcoOls=
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 - 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()
# message(STATUS "Additional CFLAGS of SDL: ${SDL2_OTHER_CFLAGS}")
endif(SDL2_OTHER_CFLAGS)
Jens