* macOS build fixes (#1773)

* macOS build fixes

Add missing headers
Threads_Pthreads: do not call pthread_setname_np() on macOS as it does not do
the same as on Linux
DebugStr() -> os_log()

* Make the project build with Makefiles on macOS

* Fix getting modifier key state on Mac (#1774)

We really need to clean up all Carbon calls here (many will go away when the
project switches to SDL2 for all platforms)

* Fix Xcode build; bump minimum version of macOS (#1775)

* Build fixes for the "Unix Makefiles" generator
Pass CMAKE_BUILD_TYPE to the external projects
* Fix indent

* Fix setting CFBundleExecutable value

* Improve handling of system libpng

Header mismatch can cause a crash, so force the non-system png.h
if WITH_SYSTEM_PNG=no

* Better handling of TRUE/FALSE with newer versions of jpeglib

* Add JPEG include directory
This commit is contained in:
Tatsh
2019-03-10 13:02:54 -07:00
committed by Colby Klein
parent b8a79cd0f6
commit 3c8ee8675d
5 changed files with 20 additions and 9 deletions
+7 -3
View File
@@ -12,7 +12,11 @@
#endif
#pragma warning(disable: 4611) /* interaction between '_setjmp' and C++ object destruction is non-portable */
#else
#ifndef SYSTEM_PNG
#include "../extern/libpng/include/png.h"
#else
#include <png.h>
#endif // SYSTEM_PNG
#endif // _MSC_VER
namespace
@@ -151,7 +155,7 @@ static RageSurface *RageSurface_Load_PNG( RageFile *f, const char *fn, char erro
type = PALETTE;
break;
case PNG_COLOR_TYPE_GRAY_ALPHA:
case PNG_COLOR_TYPE_GRAY_ALPHA:
type = RGBA;
png_set_gray_to_rgb( png );
break;
@@ -279,7 +283,7 @@ RageSurfaceUtils::OpenResult RageSurface_Load_PNG( const RString &sPath, RageSur
/*
* (c) 2004 Glenn Maynard
* All rights reserved.
*
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
@@ -289,7 +293,7 @@ RageSurfaceUtils::OpenResult RageSurface_Load_PNG( const RString &sPath, RageSur
* copyright notice(s) and this permission notice appear in all copies of
* the Software and that both the above copyright notice(s) and this
* permission notice appear in supporting documentation.
*
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF