A cleaner file structure.
A cleaner file structure.

file:a/App.cpp (deleted)
--- a/App.cpp
+++ /dev/null
@@ -1,63 +1,1 @@
-#include "App.h"
 
-App::App()
-  : _device(0)
-{}
-
-App::~App()
-{
-  _device->drop();
-}
-
-bool App::run()
-{
-  init();
-
-  while(_device->run())
-    {
-      // Render everything
-      _device->getVideoDriver()->beginScene(true,true,SColor(255,0,0,255));
-      _device->getSceneManager()->drawAll();
-      _device->getGUIEnvironment()->drawAll();
-      _device->getVideoDriver()->endScene();
-    }
-
-  return true;
-}
-
-void App::init()
-{
-  // Initialize Irrlicht
-  _device=createDevice(video::EDT_OPENGL,dimension2d<u32>(640,480),16,
-		       false,false,false,this);
-
-  _smgr=_device->getSceneManager();
-  _driver=_device->getVideoDriver();
-}
-
-bool App::OnEvent(const SEvent &event)
-{
-  switch(event.EventType)
-    {
-    case EET_KEY_INPUT_EVENT:
-      if(event.KeyInput.Key==KEY_ESCAPE && !event.KeyInput.PressedDown)
-	{
-	  _device->closeDevice();
-	  return true;
-	}
-    default:
-      break;
-    }
-
-  return false;
-}
-
-IrrlichtDevice* App::device()
-{ return _device; }
-
-ISceneManager* App::smgr()
-{ return _smgr; }
-
-IVideoDriver* App::driver()
-{ return _driver; }
-

file:a/App.h (deleted)
--- a/App.h
+++ /dev/null
@@ -1,34 +1,1 @@
-#ifndef APP_H_
-#define APP_H_
 
-#include <irrlicht.h>
-
-using namespace irr;
-using namespace irr::core;
-using namespace irr::video;
-using namespace irr::scene;
-
-class App : public IEventReceiver
-{
-public:
-  App();
-  ~App();
-
-  bool run();
-
-  bool OnEvent(const SEvent &event);
-
-protected:
-  virtual void init();
-  IrrlichtDevice* device();
-  ISceneManager* smgr();
-  IVideoDriver* driver();
-
-private:
-  IrrlichtDevice *_device;
-  ISceneManager *_smgr;
-  IVideoDriver *_driver;
-};
-
-#endif // APP_H_
-

--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -4,15 +4,15 @@
 SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
 
 FIND_PACKAGE (Irrlicht REQUIRED)
-INCLUDE_DIRECTORIES(${Irrlicht_INCLUDE_DIR})
+INCLUDE_DIRECTORIES(${Irrlicht_INCLUDE_DIR} include/)
 LINK_DIRECTORIES(${Irrlicht_LIBRARY_DIR})
 
 SET(irrkk_SRCS
-  App.cpp
+  src/App.cpp
   )
 
 SET(irrkk_H
-  App.h
+  include/App.h
   )
 
 ADD_LIBRARY(irrkk SHARED ${irrkk_SRCS})

file:b/include/App.h (new)
--- /dev/null
+++ b/include/App.h
@@ -1,1 +1,34 @@
+#ifndef APP_H_
+#define APP_H_
 
+#include <irrlicht.h>
+
+using namespace irr;
+using namespace irr::core;
+using namespace irr::video;
+using namespace irr::scene;
+
+class App : public IEventReceiver
+{
+public:
+  App();
+  ~App();
+
+  bool run();
+
+  bool OnEvent(const SEvent &event);
+
+protected:
+  virtual void init();
+  IrrlichtDevice* device();
+  ISceneManager* smgr();
+  IVideoDriver* driver();
+
+private:
+  IrrlichtDevice *_device;
+  ISceneManager *_smgr;
+  IVideoDriver *_driver;
+};
+
+#endif // APP_H_
+

file:b/src/App.cpp (new)
--- /dev/null
+++ b/src/App.cpp
@@ -1,1 +1,63 @@
+#include "App.h"
 
+App::App()
+  : _device(0)
+{}
+
+App::~App()
+{
+  _device->drop();
+}
+
+bool App::run()
+{
+  init();
+
+  while(_device->run())
+    {
+      // Render everything
+      _device->getVideoDriver()->beginScene(true,true,SColor(255,0,0,255));
+      _device->getSceneManager()->drawAll();
+      _device->getGUIEnvironment()->drawAll();
+      _device->getVideoDriver()->endScene();
+    }
+
+  return true;
+}
+
+void App::init()
+{
+  // Initialize Irrlicht
+  _device=createDevice(video::EDT_OPENGL,dimension2d<u32>(640,480),16,
+		       false,false,false,this);
+
+  _smgr=_device->getSceneManager();
+  _driver=_device->getVideoDriver();
+}
+
+bool App::OnEvent(const SEvent &event)
+{
+  switch(event.EventType)
+    {
+    case EET_KEY_INPUT_EVENT:
+      if(event.KeyInput.Key==KEY_ESCAPE && !event.KeyInput.PressedDown)
+	{
+	  _device->closeDevice();
+	  return true;
+	}
+    default:
+      break;
+    }
+
+  return false;
+}
+
+IrrlichtDevice* App::device()
+{ return _device; }
+
+ISceneManager* App::smgr()
+{ return _smgr; }
+
+IVideoDriver* App::driver()
+{ return _driver; }
+