CMAKE: Allow building without SFML
git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@983 a31d4220-a93d-0410-bf67-fe4944624d44
This commit is contained in:
parent
7ce0d17315
commit
c7a3ab4c33
|
@ -41,7 +41,7 @@ FIND_PACKAGE ( ZLIB REQUIRED )
|
|||
FIND_PACKAGE ( PNG REQUIRED )
|
||||
FIND_PACKAGE ( OpenGL REQUIRED )
|
||||
FIND_PACKAGE ( SDL REQUIRED )
|
||||
FIND_PACKAGE ( SFML REQUIRED )
|
||||
FIND_PACKAGE ( SFML )
|
||||
|
||||
# Disable looking for GTK if not going to build the GTK frontend
|
||||
# so that pkg-config is not required
|
||||
|
@ -50,6 +50,7 @@ IF(NOT NO_GTK)
|
|||
|
||||
# These dependencies require pkg-config to be found
|
||||
PKG_CHECK_MODULES ( GTKMM gtkmm-2.4 )
|
||||
PKG_CHECK_MODULES ( GDKMM gdkmm-2.4 )
|
||||
PKG_CHECK_MODULES ( GLIBMM glibmm-2.4 )
|
||||
PKG_CHECK_MODULES ( GIOMM giomm-2.4 )
|
||||
PKG_CHECK_MODULES ( GTKGLMM gtkglextmm-x11-1.2 )
|
||||
|
@ -91,6 +92,12 @@ ADD_DEFINITIONS (-DHAVE_NETINET_IN_H -DHAVE_ARPA_INET_H -DHAVE_ZLIB_H -DFINAL_VE
|
|||
|
||||
ADD_DEFINITIONS (-DVERSION='"${VERSION}"' -DPKGDATADIR='"${PKGDATADIR}"' -DPACKAGE='')
|
||||
|
||||
# Linking is disabled if SFML has not been found
|
||||
IF( NOT SFML_FOUND )
|
||||
ADD_DEFINITIONS (-DNO_LINK)
|
||||
MESSAGE(STATUS "SFML was not found, link support is disabled")
|
||||
ENDIF( NOT SFML_FOUND )
|
||||
|
||||
# The debugger is enabled by default
|
||||
# The SDL port can't be built without debugging support
|
||||
IF( NO_DEBUGGER )
|
||||
|
@ -284,6 +291,7 @@ IF( CAN_BUILD_GVBAM )
|
|||
${GLIBMM_INCLUDE_DIRS}
|
||||
${GIOMM_INCLUDE_DIRS}
|
||||
${GTKMM_INCLUDE_DIRS}
|
||||
${GDKMM_INCLUDE_DIRS}
|
||||
${GTKGLMM_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
// This file was written by denopqrihg
|
||||
|
||||
// Joybus
|
||||
bool gba_joybus_enabled = false;
|
||||
|
||||
// If disabled, gba core won't call any (non-joybus) link functions
|
||||
bool gba_link_enabled = false;
|
||||
|
||||
#ifndef NO_LINK
|
||||
#ifdef _WIN32
|
||||
#include "../win32/stdafx.h"
|
||||
#include "../win32/VBA.h"
|
||||
|
@ -18,14 +25,9 @@
|
|||
|
||||
int linktime = 0;
|
||||
|
||||
// Joybus
|
||||
bool gba_joybus_enabled = false;
|
||||
GBASockClient* dol = NULL;
|
||||
sf::IPAddress joybusHostAddr = sf::IPAddress::LocalHost;
|
||||
|
||||
// If disabled, gba core won't call any (non-joybus) link functions
|
||||
bool gba_link_enabled = false;
|
||||
|
||||
#ifdef _MSC_VER
|
||||
// Hodgepodge
|
||||
u8 tspeed = 3;
|
||||
|
@ -1219,3 +1221,7 @@ void LinkSSend(u16 value){
|
|||
}
|
||||
|
||||
#endif // _MSC_VER
|
||||
|
||||
#else // NO_LINK
|
||||
void JoyBusUpdate(int ticks) {}
|
||||
#endif // NO_LINK
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#pragma once
|
||||
|
||||
#ifndef NO_LINK
|
||||
#include <SFML/Network.hpp>
|
||||
#endif
|
||||
|
||||
#define LINK_PARENTLOST 0x80
|
||||
#define UNSUPPORTED -1
|
||||
|
@ -116,7 +118,9 @@ typedef struct {
|
|||
#endif
|
||||
|
||||
extern bool gba_joybus_enabled;
|
||||
#ifndef NO_LINK
|
||||
extern sf::IPAddress joybusHostAddr;
|
||||
#endif
|
||||
extern void JoyBusConnect();
|
||||
extern void JoyBusShutdown();
|
||||
extern void JoyBusUpdate(int ticks);
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
#ifndef NO_LINK
|
||||
|
||||
#include "GBASockClient.h"
|
||||
|
||||
// Currently only for Joybus communications
|
||||
|
@ -36,3 +38,5 @@ char GBASockClient::ReceiveCmd(char* data_in)
|
|||
|
||||
return data_in[0];
|
||||
}
|
||||
|
||||
#endif // NO_LINK
|
||||
|
|
Loading…
Reference in New Issue