mirror of
https://github.com/celisej567/mcpe.git
synced 2026-09-23 20:09:46 +03:00
Platforms: Add FreeBSD support
This commit is contained in:
@@ -13,8 +13,8 @@ target_link_libraries(reminecraftpe-openal PUBLIC reminecraftpe-core)
|
||||
if(EMSCRIPTEN)
|
||||
target_link_libraries(reminecraftpe-openal PUBLIC openal)
|
||||
else()
|
||||
find_library(OPENAL_LIBRARY NAMES openal REQUIRED)
|
||||
target_link_libraries(reminecraftpe-openal PUBLIC "${OPENAL_LIBRARY}")
|
||||
find_package(OpenAL REQUIRED)
|
||||
target_link_libraries(reminecraftpe-openal PUBLIC OpenAL::OpenAL)
|
||||
endif()
|
||||
|
||||
# Headers
|
||||
|
||||
@@ -10,8 +10,8 @@
|
||||
#include <OpenAL/al.h>
|
||||
#include <OpenAL/alc.h>
|
||||
#else
|
||||
#include <AL/al.h>
|
||||
#include <AL/alc.h>
|
||||
#include <al.h>
|
||||
#include <alc.h>
|
||||
#endif
|
||||
|
||||
#include <string>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
#include <cstdarg>
|
||||
#include <libgen.h>
|
||||
|
||||
#include "thirdparty/SDL2/SDL2.h"
|
||||
|
||||
@@ -305,6 +306,9 @@ void CheckOptionalTextureAvailability()
|
||||
// Main
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
// cd build; ./reminecraftpe otherwise
|
||||
chdir(dirname(argv[0]));
|
||||
|
||||
if (SDL_Init(SDL_INIT_VIDEO) < 0)
|
||||
{
|
||||
LOG_E("Unable To Initialize SDL: %s", SDL_GetError());
|
||||
|
||||
4
thirdparty/SDL2/SDL2.h
vendored
4
thirdparty/SDL2/SDL2.h
vendored
@@ -2,7 +2,5 @@
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma comment(lib, "SDL2.lib")
|
||||
#endif
|
||||
#include <SDL.h>
|
||||
#else
|
||||
#include <SDL2/SDL.h>
|
||||
#endif
|
||||
Reference in New Issue
Block a user