Had to do a lot of configurations to get the cross-module include work correctly.

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1679 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
groogy 2010-11-19 14:03:40 +00:00
parent f1cae1cfef
commit 8153ec8db8
6 changed files with 16 additions and 12 deletions

View File

@ -20,9 +20,10 @@
* source distribution.
*/
#include "../../sfml-system/system/main.hpp"
#include "main.hpp"
#include "Color.hpp"
#include "Rect.hpp"
#include "Drawable.hpp"
#include <SFML/Graphics.hpp>
@ -70,4 +71,6 @@ void Init_graphics( void )
rb_define_const(globalSFMLNamespace, "GraphicsLoaded", Qtrue);
Init_Color();
Init_Rect();
Init_Drawable();
}

View File

@ -20,10 +20,11 @@
* source distribution.
*/
#ifndef SFML_RUBYEXT_MAIN_HEADER_
#define SFML_RUBYEXT_MAIN_HEADER_
#ifndef SFML_RUBYEXT_GRAPHICS_MAIN_HEADER_
#define SFML_RUBYEXT_GRAPHICS_MAIN_HEADER_
#include "ruby.h"
#include "../../sfml-system/system/main.hpp"
// Ruby initiation function
extern "C" void Init_graphics( void );
@ -42,4 +43,4 @@ if( rb_obj_is_kind_of( variable, type ) != Qtrue ) \
#define rb_define_singleton_method( klass, name, func, argc, ... ) rb_define_singleton_method( klass, name, reinterpret_cast< RubyFunctionPtr >( func ), argc, ##__VA_ARGS__ )
#define rb_define_method( klass, name, func, argc, ... ) rb_define_method( klass, name, reinterpret_cast< RubyFunctionPtr >( func ), argc, ##__VA_ARGS__ )
#endif // SFML_RUBYEXT_MAIN_HEADER_
#endif // SFML_RUBYEXT_GRAPHICS_MAIN_HEADER_

View File

@ -20,8 +20,8 @@
* source distribution.
*/
#ifndef SFML_RUBYEXT_MAIN_HEADER_
#define SFML_RUBYEXT_MAIN_HEADER_
#ifndef SFML_RUBYEXT_SYSTEM_MAIN_HEADER_
#define SFML_RUBYEXT_SYSTEM_MAIN_HEADER_
#include "ruby.h"
@ -35,4 +35,4 @@ typedef VALUE ( *RubyFunctionPtr )( ... );
#define rb_define_singleton_method( klass, name, func, argc, ... ) rb_define_singleton_method( klass, name, reinterpret_cast< RubyFunctionPtr >( func ), argc, ##__VA_ARGS__ )
#define rb_define_method( klass, name, func, argc, ... ) rb_define_method( klass, name, reinterpret_cast< RubyFunctionPtr >( func ), argc, ##__VA_ARGS__ )
#endif // SFML_RUBYEXT_MAIN_HEADER_
#endif // SFML_RUBYEXT_SYSTEM_MAIN_HEADER_

View File

@ -20,7 +20,6 @@
* source distribution.
*/
#include "../../sfml-system/system/main.hpp"
#include "main.hpp"
#include "Context.hpp"
#include "ContextSettings.hpp"

View File

@ -20,10 +20,11 @@
* source distribution.
*/
#ifndef SFML_RUBYEXT_MAIN_HEADER_
#define SFML_RUBYEXT_MAIN_HEADER_
#ifndef SFML_RUBYEXT_WINDOW_MAIN_HEADER_
#define SFML_RUBYEXT_WINDOW_MAIN_HEADER_
#include "ruby.h"
#include "../../sfml-system/system/main.hpp"
// Ruby initiation function
extern "C" void Init_window( void );
@ -39,4 +40,4 @@ if( rb_obj_is_kind_of( variable, type ) != Qtrue ) \
#define rb_define_singleton_method( klass, name, func, argc, ... ) rb_define_singleton_method( klass, name, reinterpret_cast< RubyFunctionPtr >( func ), argc, ##__VA_ARGS__ )
#define rb_define_method( klass, name, func, argc, ... ) rb_define_method( klass, name, reinterpret_cast< RubyFunctionPtr >( func ), argc, ##__VA_ARGS__ )
#endif // SFML_RUBYEXT_MAIN_HEADER_
#endif // SFML_RUBYEXT_WINDOW_MAIN_HEADER_