Support building nlgeorges as dll

feature/nel-dll
kaetemi 6 years ago
parent c2a6fad386
commit 9e361266a8

@ -22,7 +22,7 @@
#include "form_elm.h" #include "form_elm.h"
#include "header.h" #include "header.h"
extern bool convertFormFile (const std::string &oldFileName, const std::string &newFileName); NLGEORGES_API extern bool convertFormFile(const std::string &oldFileName, const std::string &newFileName);
namespace NLGEORGES namespace NLGEORGES
{ {

@ -38,7 +38,7 @@ class UForm : public NLMISC::CRefCount
{ {
public: public:
virtual ~UForm (); virtual ~UForm() {}
/** /**
* Access form nodes * Access form nodes

@ -58,10 +58,10 @@ public:
virtual UType *loadFormType (const std::string &filename) = 0; virtual UType *loadFormType (const std::string &filename) = 0;
/// Create a form loader /// Create a form loader
static UFormLoader *createLoader (); NLGEORGES_API static UFormLoader *createLoader();
/// Create a form loader /// Create a form loader
static void releaseLoader (UFormLoader *loader); NLGEORGES_API static void releaseLoader(UFormLoader *loader);
}; };

@ -556,9 +556,15 @@ typedef uint16 ucchar;
#else #else
#define NLSOUND_LOWLEVEL_API NL_DECL_DLLIMP #define NLSOUND_LOWLEVEL_API NL_DECL_DLLIMP
#endif #endif
#ifdef NLGEORGES_DLLEXP
#define NLGEORGES_API NL_DECL_DLLEXP
#else
#define NLGEORGES_API NL_DECL_DLLIMP
#endif
#else #else
#define NLMISC_API #define NLMISC_API
#define NLSOUND_LOWLEVEL_API #define NLSOUND_LOWLEVEL_API
#define NLGEORGES_API
#endif #endif
// To define a 64bits constant; ie: UINT64_CONSTANT(0x123456781234) // To define a 64bits constant; ie: UINT64_CONSTANT(0x123456781234)

@ -3,7 +3,7 @@ FILE(GLOB HEADERS ../../include/nel/georges/*.h)
# SOURCE_GROUP(headers FILES ${HEADERS}) # SOURCE_GROUP(headers FILES ${HEADERS})
NL_TARGET_LIB(nelgeorges ${HEADERS} ${SRC}) NL_TARGET_LIB2(nelgeorges ${HEADERS} ${SRC})
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
@ -13,6 +13,10 @@ NL_ADD_RUNTIME_FLAGS(nelgeorges)
NL_ADD_LIB_SUFFIX(nelgeorges) NL_ADD_LIB_SUFFIX(nelgeorges)
IF(WIN32 AND NOT WITH_STATIC2)
ADD_DEFINITIONS(-DNLGEORGES_DLLEXP)
ENDIF()
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
IF(WITH_PCH) IF(WITH_PCH)

@ -64,12 +64,6 @@ void warning (bool exception, const char *format, ... )
// UForm // UForm
// *************************************************************************** // ***************************************************************************
UForm::~UForm ()
{
}
// ***************************************************************************
UFormElm& CForm::getRootNode () UFormElm& CForm::getRootNode ()
{ {
return Elements; return Elements;

Loading…
Cancel
Save