mirror of
https://github.com/SFML/SFML.git
synced 2024-12-01 15:51:04 +08:00
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:
parent
f1cae1cfef
commit
8153ec8db8
@ -22,6 +22,6 @@
|
||||
require 'mkmf'
|
||||
|
||||
dir_config("graphics")
|
||||
have_library("sfml-graphics")
|
||||
have_library("sfml-graphics")
|
||||
find_header("main.hpp", "../sfml-system/system")
|
||||
create_makefile("sfml/graphics", "graphics")
|
||||
|
@ -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();
|
||||
}
|
||||
|
@ -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_
|
||||
|
@ -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_
|
||||
|
@ -20,7 +20,6 @@
|
||||
* source distribution.
|
||||
*/
|
||||
|
||||
#include "../../sfml-system/system/main.hpp"
|
||||
#include "main.hpp"
|
||||
#include "Context.hpp"
|
||||
#include "ContextSettings.hpp"
|
||||
|
@ -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_
|
||||
|
Loading…
Reference in New Issue
Block a user