diff --git a/dtool/Config.pp b/dtool/Config.pp index f705983bb3..59e37dd194 100644 --- a/dtool/Config.pp +++ b/dtool/Config.pp @@ -1105,6 +1105,14 @@ #define ARTOOLKIT_LIBS $[if $[WINDOWS_PLATFORM],libAR.lib,AR] #defer HAVE_ARTOOLKIT $[libtest $[ARTOOLKIT_LPATH],$[ARTOOLKIT_LIBS]] +// libRocket is a GUI library +#define ROCKET_IPATH /usr/local/include +#define ROCKET_LPATH /usr/local/lib +#define ROCKET_LIBS RocketCore boost_python +#defer HAVE_ROCKET $[libtest $[ROCKET_LPATH],$[ROCKET_LIBS]] +// Unset this if you built libRocket without Python bindings +#defer HAVE_ROCKET_PYTHON $[and $[HAVE_ROCKET],$[HAVE_PYTHON]] + // Define this to explicitly indicate the given platform string within // the resulting Panda runtime. Normally it is best to leave this // undefined, in which case Panda will determine the best value diff --git a/dtool/LocalSetup.pp b/dtool/LocalSetup.pp index b000456fc1..45dfa727af 100644 --- a/dtool/LocalSetup.pp +++ b/dtool/LocalSetup.pp @@ -230,6 +230,15 @@ #else #print - Did not find ARToolKit #endif +#if $[HAVE_ROCKET] +#if $[HAVE_ROCKET_PYTHON] +#print + libRocket with Python bindings +#else +#print + libRocket without Python bindings +#endif +#else +#print - Did not find libRocket +#endif #print #if $[and $[HAVE_INTERROGATE],$[HAVE_PYTHON]] @@ -307,6 +316,9 @@ $[cdefine STDFLOAT_DOUBLE] $[cdefine HAVE_MAYA] $[cdefine MAYA_PRE_5_0] +/* Define if we have libRocket available and built with Python support. */ +$[cdefine HAVE_ROCKET_PYTHON] + /* Define if we have SoftImage available. */ $[cdefine HAVE_SOFTIMAGE] diff --git a/dtool/Package.pp b/dtool/Package.pp index 9d2b4335b0..ffebcde881 100644 --- a/dtool/Package.pp +++ b/dtool/Package.pp @@ -377,6 +377,12 @@ #set ARTOOLKIT_LIBS $[ARTOOLKIT_LIBS] #set HAVE_ARTOOLKIT $[HAVE_ARTOOLKIT] +#set ROCKET_IPATH $[unixfilename $[ROCKET_IPATH]] +#set ROCKET_LPATH $[unixfilename $[ROCKET_LPATH]] +#set ROCKET_LIBS $[ROCKET_LIBS] +#set HAVE_ROCKET $[HAVE_ROCKET] +#set HAVE_ROCKET_PYTHON $[HAVE_ROCKET_PYTHON] + // Now infer a few more variables based on what was defined. #if $[and $[HAVE_GTK],$[PKG_CONFIG]] #define cflags $[shell $[PKG_CONFIG] gtk+-2.0 --cflags] diff --git a/dtool/pptempl/Global.pp b/dtool/pptempl/Global.pp index 9bd2064943..c2f84b09dc 100644 --- a/dtool/pptempl/Global.pp +++ b/dtool/pptempl/Global.pp @@ -497,6 +497,12 @@ #define artoolkit_libs $[ARTOOLKIT_LIBS] #endif +#if $[HAVE_ROCKET] + #define rocket_ipath $[wildcard $[ROCKET_IPATH]] + #define rocket_lpath $[wildcard $[ROCKET_LPATH]] + #define rocket_libs $[ROCKET_LIBS] +#endif + // We define these two variables true here in the global scope; a // particular Sources.pp file can redefine these to be false to // prevent a particular directory or target from being built in @@ -941,7 +947,7 @@ Warning: Variable $[upcase $[tree]]_INSTALL is not set! // Caution! interrogate_ipath might be redefined in the // Global.platform.pp file. -#defer interrogate_ipath $[install_parser_inc_dir:%=-S%] $[target_ipath:%=-I%] +#defer interrogate_ipath $[install_parser_inc_dir:%=-S%] $[INTERROGATE_SYSTEM_IPATH:%=-S%] $[target_ipath:%=-I%] #defer interrogate_options \ -DCPPPARSER -D__STDC__=1 -D__cplusplus $[SYSTEM_IGATE_FLAGS] \ diff --git a/dtool/src/parser-inc/RenderInterface.h b/dtool/src/parser-inc/RenderInterface.h new file mode 100644 index 0000000000..981700c54d --- /dev/null +++ b/dtool/src/parser-inc/RenderInterface.h @@ -0,0 +1,33 @@ +// Filename: RenderInterface.h +// Created by: rdb (25Nov11) +// +//////////////////////////////////////////////////////////////////// +// +// PANDA 3D SOFTWARE +// Copyright (c) Carnegie Mellon University. All rights reserved. +// +// All use of this software is subject to the terms of the revised BSD +// license. You should have received a copy of this license along +// with this source code in a file named "LICENSE." +// +//////////////////////////////////////////////////////////////////// + +// This file, and all the other files in this directory, aren't +// intended to be compiled--they're just parsed by CPPParser (and +// interrogate) in lieu of the actual system headers, to generate the +// interrogate database. + +namespace Rocket { + namespace Core { + class Context; + class RenderInterface; + class String; + class Vector2f; + class Vector2i; + class Vertex; + + typedef unsigned char byte; + typedef void* CompiledGeometryHandle; + typedef void* TextureHandle; + } +} diff --git a/dtool/src/parser-inc/Sources.pp b/dtool/src/parser-inc/Sources.pp index 773f0fd096..d391fb3ca5 100644 --- a/dtool/src/parser-inc/Sources.pp +++ b/dtool/src/parser-inc/Sources.pp @@ -25,6 +25,5 @@ WebCore.h WebView.h WebViewListener.h \ Core/Core.h Forest/Forest.h Renderers/OpenGL/OpenGLRenderer.h \ Renderers/DirectX9/DirectX9Renderer.h \ - glew/glew.h Eigen/Dense Eigen/StdVector - - + glew/glew.h Eigen/Dense Eigen/StdVector \ + Rocket/Core/RenderInterface.h