mirror of https://github.com/AxioDL/boo.git
Compile fixes
This commit is contained in:
parent
395e39d63a
commit
87ab129e01
|
@ -73,22 +73,25 @@ else()
|
|||
|
||||
endif()
|
||||
|
||||
set(BOO_SYS_LIBS ${BOO_SYS_LIBS} CACHE PATH "Boo System Libraries" FORCE)
|
||||
|
||||
include_directories(include)
|
||||
|
||||
add_library(Boo
|
||||
lib/inputdev/CafeProPad.cpp include/inputdev/CafeProPad.hpp
|
||||
lib/inputdev/RevolutionPad.cpp include/inputdev/RevolutionPad.hpp
|
||||
lib/inputdev/DolphinSmashAdapter.cpp include/inputdev/DolphinSmashAdapter.hpp
|
||||
lib/inputdev/DualshockPad.cpp include/inputdev/DualshockPad.hpp
|
||||
lib/inputdev/GenericPad.cpp include/inputdev/GenericPad.hpp
|
||||
lib/inputdev/DeviceBase.cpp include/inputdev/DeviceBase.hpp
|
||||
lib/inputdev/DeviceSignature.cpp include/inputdev/DeviceSignature.hpp
|
||||
include/inputdev/IHIDListener.hpp
|
||||
lib/inputdev/CafeProPad.cpp include/boo/inputdev/CafeProPad.hpp
|
||||
lib/inputdev/RevolutionPad.cpp include/boo/inputdev/RevolutionPad.hpp
|
||||
lib/inputdev/DolphinSmashAdapter.cpp include/boo/inputdev/DolphinSmashAdapter.hpp
|
||||
lib/inputdev/DualshockPad.cpp include/boo/inputdev/DualshockPad.hpp
|
||||
lib/inputdev/GenericPad.cpp include/boo/inputdev/GenericPad.hpp
|
||||
lib/inputdev/DeviceBase.cpp include/boo/inputdev/DeviceBase.hpp
|
||||
lib/inputdev/DeviceSignature.cpp include/boo/inputdev/DeviceSignature.hpp
|
||||
include/boo/inputdev/IHIDListener.hpp
|
||||
lib/inputdev/IHIDDevice.hpp
|
||||
include/IGraphicsContext.hpp
|
||||
include/IWindow.hpp
|
||||
include/IApplication.hpp
|
||||
include/boo.hpp
|
||||
include/boo/IGraphicsContext.hpp
|
||||
include/boo/IWindow.hpp
|
||||
include/boo/IApplication.hpp
|
||||
include/boo/boo.hpp
|
||||
InputDeviceClasses.cpp
|
||||
${PLAT_SRCS})
|
||||
|
||||
add_subdirectory(test)
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "inputdev/DeviceSignature.hpp"
|
||||
#include "inputdev/DolphinSmashAdapter.hpp"
|
||||
#include "boo/inputdev/DeviceSignature.hpp"
|
||||
#include "boo/inputdev/DolphinSmashAdapter.hpp"
|
||||
|
||||
namespace boo
|
||||
{
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#ifndef IRUNLOOP_HPP
|
||||
#define IRUNLOOP_HPP
|
||||
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
@ -55,7 +56,8 @@ public:
|
|||
|
||||
};
|
||||
|
||||
IApplication* IApplicationBootstrap(IApplication::EPlatformType platform,
|
||||
std::shared_ptr<IApplication>
|
||||
ApplicationBootstrap(IApplication::EPlatformType platform,
|
||||
IApplicationCallback& cb,
|
||||
const std::string& uniqueName,
|
||||
const std::string& friendlyName,
|
||||
|
@ -64,19 +66,20 @@ IApplication* IApplicationBootstrap(IApplication::EPlatformType platform,
|
|||
bool singleInstance=true);
|
||||
extern IApplication* APP;
|
||||
|
||||
static inline IApplication* IApplicationBootstrap(IApplication::EPlatformType platform,
|
||||
static inline std::shared_ptr<IApplication>
|
||||
ApplicationBootstrap(IApplication::EPlatformType platform,
|
||||
IApplicationCallback& cb,
|
||||
const std::string& uniqueName,
|
||||
const std::string& friendlyName,
|
||||
int argc, char** argv,
|
||||
int argc, const char** argv,
|
||||
bool singleInstance=true)
|
||||
{
|
||||
if (APP)
|
||||
return APP;
|
||||
return std::shared_ptr<IApplication>(APP);
|
||||
std::vector<std::string> args;
|
||||
for (int i=1 ; i<argc ; ++i)
|
||||
args.push_back(argv[i]);
|
||||
return IApplicationBootstrap(platform, cb, uniqueName, friendlyName, argv[0], args, singleInstance);
|
||||
return ApplicationBootstrap(platform, cb, uniqueName, friendlyName, argv[0], args, singleInstance);
|
||||
}
|
||||
|
||||
}
|
|
@ -1 +1 @@
|
|||
#include "inputdev/CafeProPad.hpp"
|
||||
#include "boo/inputdev/CafeProPad.hpp"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "inputdev/DeviceBase.hpp"
|
||||
#include "inputdev/DeviceToken.hpp"
|
||||
#include "boo/inputdev/DeviceBase.hpp"
|
||||
#include "boo/inputdev/DeviceToken.hpp"
|
||||
#include "IHIDDevice.hpp"
|
||||
|
||||
namespace boo
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "inputdev/DeviceSignature.hpp"
|
||||
#include "inputdev/DeviceToken.hpp"
|
||||
#include "inputdev/GenericPad.hpp"
|
||||
#include "boo/inputdev/DeviceSignature.hpp"
|
||||
#include "boo/inputdev/DeviceToken.hpp"
|
||||
#include "boo/inputdev/GenericPad.hpp"
|
||||
#include "IHIDDevice.hpp"
|
||||
|
||||
namespace boo
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "inputdev/DolphinSmashAdapter.hpp"
|
||||
#include "boo/inputdev/DolphinSmashAdapter.hpp"
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
|
|
|
@ -1 +1 @@
|
|||
#include "inputdev/DualshockPad.hpp"
|
||||
#include "boo/inputdev/DualshockPad.hpp"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "inputdev/GenericPad.hpp"
|
||||
#include "inputdev/DeviceToken.hpp"
|
||||
#include "boo/inputdev/GenericPad.hpp"
|
||||
#include "boo/inputdev/DeviceToken.hpp"
|
||||
|
||||
namespace boo
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "IHIDDevice.hpp"
|
||||
#include "inputdev/DeviceToken.hpp"
|
||||
#include "inputdev/DeviceBase.hpp"
|
||||
#include "boo/inputdev/DeviceToken.hpp"
|
||||
#include "boo/inputdev/DeviceBase.hpp"
|
||||
#include <thread>
|
||||
#include <mutex>
|
||||
#include <condition_variable>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "inputdev/IHIDListener.hpp"
|
||||
#include "inputdev/DeviceFinder.hpp"
|
||||
#include "boo/inputdev/IHIDListener.hpp"
|
||||
#include "boo/inputdev/DeviceFinder.hpp"
|
||||
#include <libudev.h>
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef IHIDDEVICE_HPP
|
||||
#define IHIDDEVICE_HPP
|
||||
|
||||
#include "inputdev/DeviceToken.hpp"
|
||||
#include "boo/inputdev/DeviceToken.hpp"
|
||||
|
||||
namespace boo
|
||||
{
|
||||
|
|
|
@ -1 +1 @@
|
|||
#include "inputdev/RevolutionPad.hpp"
|
||||
#include "boo/inputdev/RevolutionPad.hpp"
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
#include "ApplicationXCB.hpp"
|
||||
#include "ApplicationWayland.hpp"
|
||||
|
||||
#include <memory>
|
||||
#include <dbus/dbus.h>
|
||||
#include <stdio.h>
|
||||
|
||||
|
@ -47,7 +48,7 @@ namespace boo
|
|||
{
|
||||
|
||||
IApplication* APP = NULL;
|
||||
IApplication* IApplicationBootstrap(IApplication::EPlatformType platform,
|
||||
std::shared_ptr<IApplication> ApplicationBootstrap(IApplication::EPlatformType platform,
|
||||
IApplicationCallback& cb,
|
||||
const std::string& uniqueName,
|
||||
const std::string& friendlyName,
|
||||
|
@ -63,9 +64,9 @@ IApplication* IApplicationBootstrap(IApplication::EPlatformType platform,
|
|||
platform == IApplication::PLAT_AUTO)
|
||||
APP = new ApplicationXCB(cb, uniqueName, friendlyName, pname, args, singleInstance);
|
||||
else
|
||||
return NULL;
|
||||
return std::shared_ptr<IApplication>();
|
||||
}
|
||||
return APP;
|
||||
return std::shared_ptr<IApplication>(APP);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#error This file may only be included from CApplicationUnix.cpp
|
||||
#endif
|
||||
|
||||
#include "IApplication.hpp"
|
||||
#include "boo/IApplication.hpp"
|
||||
|
||||
#include <dbus/dbus.h>
|
||||
DBusConnection* registerDBus(const char* appName, bool& isFirst);
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#error This file may only be included from CApplicationUnix.cpp
|
||||
#endif
|
||||
|
||||
#include "IApplication.hpp"
|
||||
#include "boo/IApplication.hpp"
|
||||
|
||||
#define explicit explicit_c
|
||||
#include <xcb/xcb.h>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "IGraphicsContext.hpp"
|
||||
#include "IWindow.hpp"
|
||||
#include "boo/IGraphicsContext.hpp"
|
||||
#include "boo/IWindow.hpp"
|
||||
|
||||
namespace boo
|
||||
{
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "IGraphicsContext.hpp"
|
||||
#include "IWindow.hpp"
|
||||
#include "boo/IGraphicsContext.hpp"
|
||||
#include "boo/IWindow.hpp"
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/glx.h>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include "IWindow.hpp"
|
||||
#include "IGraphicsContext.hpp"
|
||||
#include "boo/IWindow.hpp"
|
||||
#include "boo/IGraphicsContext.hpp"
|
||||
|
||||
namespace boo
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "IWindow.hpp"
|
||||
#include "IGraphicsContext.hpp"
|
||||
#include "IApplication.hpp"
|
||||
#include "boo/IWindow.hpp"
|
||||
#include "boo/IGraphicsContext.hpp"
|
||||
#include "boo/IApplication.hpp"
|
||||
|
||||
#include <xcb/xcb.h>
|
||||
#include <xcb/xcb_event.h>
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
add_executable(booTest main.cpp ../InputDeviceClasses.cpp)
|
||||
add_executable(booTest main.cpp)
|
||||
target_link_libraries(booTest Boo ${BOO_SYS_LIBS})
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
#include <stdio.h>
|
||||
#include <boo.hpp>
|
||||
#include <boo/boo.hpp>
|
||||
|
||||
namespace boo
|
||||
{
|
||||
|
@ -134,13 +134,13 @@ struct TestApplicationCallback : IApplicationCallback
|
|||
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
int main(int argc, const char** argv)
|
||||
{
|
||||
boo::TestApplicationCallback appCb;
|
||||
boo::IApplication* app = IApplicationBootstrap(boo::IApplication::PLAT_AUTO,
|
||||
std::shared_ptr<boo::IApplication> app =
|
||||
ApplicationBootstrap(boo::IApplication::PLAT_AUTO,
|
||||
appCb, "rwk", "RWK", argc, argv);
|
||||
app->run();
|
||||
delete app;
|
||||
printf("IM DYING!!\n");
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue