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