Fix cmake-on-mac build errors.
This commit is contained in:
parent
07032bc216
commit
b095266070
3 changed files with 7 additions and 3 deletions
|
@ -133,6 +133,7 @@ ENDIF()
|
|||
|
||||
FIND_PACKAGE(JPEG)
|
||||
IF(JPEG_FOUND)
|
||||
INCLUDE_DIRECTORIES( ${JPEG_INCLUDE_DIRS} )
|
||||
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};LIBJPEG_STATIC)
|
||||
SET(FTE_LIBS ${FTE_LIBS} ${JPEG_LIBRARIES})
|
||||
ELSE()
|
||||
|
@ -142,6 +143,7 @@ ENDIF()
|
|||
|
||||
FIND_PACKAGE(PNG)
|
||||
IF(PNG_FOUND)
|
||||
INCLUDE_DIRECTORIES( ${PNG_INCLUDE_DIRS} )
|
||||
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};LIBPNG_STATIC)
|
||||
SET(FTE_LIBS ${FTE_LIBS} ${PNG_LIBRARIES})
|
||||
ELSE()
|
||||
|
@ -169,6 +171,7 @@ ENDIF()
|
|||
|
||||
FIND_LIBRARY(VORBISFILE_LIBRARY NAMES vorbisfile)
|
||||
IF(NOT VORBISFILE_LIBRARY)
|
||||
INCLUDE_DIRECTORIES( ${VORBISFILE_INCLUDE_DIRS} )
|
||||
MESSAGE(WARNING "libvorbisfile library NOT available. Who listens to the bgm anyway?")
|
||||
SET(FTE_LIB_DEFINES ${FTE_LIB_DEFINES};NO_OGG)
|
||||
ENDIF()
|
||||
|
|
|
@ -491,7 +491,7 @@ static void J_ControllerSensor(SDL_JoystickID jid, SDL_SensorType sensor, float
|
|||
if (joy->qdevid == DEVID_UNSET)
|
||||
return;
|
||||
|
||||
safeswitch(sensor)
|
||||
switch(sensor)
|
||||
{
|
||||
case SDL_SENSOR_ACCEL:
|
||||
IN_Accelerometer(joy->qdevid, data[0], data[1], data[2]);
|
||||
|
@ -499,9 +499,10 @@ static void J_ControllerSensor(SDL_JoystickID jid, SDL_SensorType sensor, float
|
|||
case SDL_SENSOR_GYRO:
|
||||
IN_Gyroscope(joy->qdevid, data[0], data[1], data[2]);
|
||||
break;
|
||||
|
||||
case SDL_SENSOR_INVALID:
|
||||
case SDL_SENSOR_UNKNOWN:
|
||||
safedefault:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
#ifndef WIN32
|
||||
#include <fcntl.h>
|
||||
#include <sys/stat.h>
|
||||
#ifdef __unix__
|
||||
#if defined(__unix__) || defined(__unix) || (defined(__APPLE__) && defined(__MACH__)) //apple make everything painful.
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#else
|
||||
|
|
Loading…
Reference in a new issue