Build: Use sdl2-config for SDL2 includes (#5)

Fixes compilation on ARM Macs
This commit is contained in:
elzo-d 2023-02-05 17:01:20 +01:00 committed by GitHub
parent be9d877765
commit 45661ded1c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 8 additions and 5 deletions

2
.gitignore vendored
View file

@ -17,6 +17,8 @@ build/
[Oo]bj/
[Oo]bj.x86/
[Oo]bj.x64/
[Oo]bj.linux-*/
[Oo]bj.osx-*/
# Enable "build/" folder in the NuGet Packages folder since NuGet packages use it for MSBuild targets
!packages/*/build/

View file

@ -1,5 +1,5 @@
#pragma once
#include <SDL2/SDL.h>
#include "SDL.h"
#include "Core/Shared/Interfaces/IRenderingDevice.h"
#include "Utilities/SimpleLock.h"
#include "Core/Shared/Video/VideoRenderer.h"

View file

@ -1,5 +1,5 @@
#pragma once
#include <SDL2/SDL.h>
#include "SDL.h"
#include "Core/Shared/Audio/BaseSoundManager.h"
class Emulator;

View file

@ -18,7 +18,10 @@ else
PROFILE_USE_FLAG = -fprofile-instr-use=$(CURDIR)/PGOHelper/pgo.profdata
endif
CXXFLAGS=-fPIC -Wall --std=c++17 -O3 $(MESENFLAGS) -I/usr/include/SDL2 -I $(realpath ./) -I $(realpath ./Core) -I $(realpath ./Utilities) -I $(realpath ./Linux)
SDL2LIB=$(shell sdl2-config --libs)
SDL2INC=$(shell sdl2-config --cflags)
CXXFLAGS=-fPIC -Wall --std=c++17 -O3 $(MESENFLAGS) $(SDL2INC) -I $(realpath ./) -I $(realpath ./Core) -I $(realpath ./Utilities) -I $(realpath ./Linux)
CFLAGS=-fPIC -Wall -O3 $(MESENFLAGS)
LINKCHECKUNRESOLVED=-Wl,-z,defs
@ -104,8 +107,6 @@ else
LIBEVDEVINC=-I../
endif
SDL2LIB=$(shell sdl2-config --libs)
SDL2INC=$(shell sdl2-config --cflags)
FSLIB=-lstdc++fs
ifeq ($(MESENOS),osx)