Support building ligo as dll

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

@ -36,7 +36,7 @@ class CPrimitive;
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class CLigoConfig class NLLIGO_API CLigoConfig
{ {
public: public:

@ -31,7 +31,7 @@ namespace NLLIGO
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class CLigoError class NLLIGO_API CLigoError
{ {
public: public:
enum TError enum TError

@ -36,7 +36,7 @@ class CLigoConfig;
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class CMaterial class NLLIGO_API CMaterial
{ {
public: public:

@ -79,7 +79,7 @@ public:
* This class is a property class for ligo primitive. * This class is a property class for ligo primitive.
* This is a simple string * This is a simple string
*/ */
class CPropertyString : public IProperty class NLLIGO_API CPropertyString : public IProperty
{ {
public: public:
CPropertyString () {} CPropertyString () {}
@ -106,7 +106,7 @@ public:
* This class is a property class for ligo primitive. * This class is a property class for ligo primitive.
* This is a string array * This is a string array
*/ */
class CPropertyStringArray : public IProperty class NLLIGO_API CPropertyStringArray : public IProperty
{ {
public: public:
CPropertyStringArray () {} CPropertyStringArray () {}
@ -132,7 +132,7 @@ public:
* This class is a property class for ligo primitive. * This class is a property class for ligo primitive.
* This is a string array * This is a string array
*/ */
class CPropertyColor : public IProperty class NLLIGO_API CPropertyColor : public IProperty
{ {
public: public:
NLMISC::CRGBA Color; NLMISC::CRGBA Color;
@ -154,7 +154,7 @@ public:
// *************************************************************************** // ***************************************************************************
class CPrimVector : public NLMISC::CVector class NLLIGO_API CPrimVector : public NLMISC::CVector
{ {
public: public:
CPrimVector () CPrimVector ()
@ -184,7 +184,7 @@ public:
* Provide access to common properties. * Provide access to common properties.
* Provide access to the primitive hierachy * Provide access to the primitive hierachy
*/ */
class IPrimitive : public NLMISC::IStreamable class NLLIGO_API IPrimitive : public NLMISC::IStreamable
{ {
friend class CPrimitives; friend class CPrimitives;
public: public:
@ -417,7 +417,7 @@ private:
// *************************************************************************** // ***************************************************************************
// Simple primitive node // Simple primitive node
class CPrimNode : public IPrimitive class NLLIGO_API CPrimNode : public IPrimitive
{ {
public: public:
// \name From IClassable // \name From IClassable
@ -442,7 +442,7 @@ protected:
// *************************************************************************** // ***************************************************************************
class CPrimPoint : public IPrimitive class NLLIGO_API CPrimPoint : public IPrimitive
{ {
public: public:
@ -484,7 +484,7 @@ protected:
// *************************************************************************** // ***************************************************************************
class CPrimPath : public IPrimitive class NLLIGO_API CPrimPath : public IPrimitive
{ {
public: public:
@ -520,7 +520,7 @@ protected:
// *************************************************************************** // ***************************************************************************
class CPrimZone : public IPrimitive class NLLIGO_API CPrimZone : public IPrimitive
{ {
public: public:
@ -583,7 +583,7 @@ protected:
* Usage of this primitive imply the setting of the appropriate 'ligo context' * Usage of this primitive imply the setting of the appropriate 'ligo context'
* before reading or copy/pasting alias. * before reading or copy/pasting alias.
*/ */
class CPrimAlias : public IPrimitive class NLLIGO_API CPrimAlias : public IPrimitive
{ {
friend class CPrimitives; friend class CPrimitives;
@ -646,7 +646,7 @@ public:
/* /*
This class is deprecated. This class is deprecated.
*/ */
class CPrimRegion class NLLIGO_API CPrimRegion
{ {
public: public:
@ -670,7 +670,7 @@ public:
/** /**
* This class is a ligo primitives set * This class is a ligo primitives set
*/ */
class CPrimitives class NLLIGO_API CPrimitives
{ {
public: public:
@ -752,7 +752,7 @@ private:
/** Singleton to manage special loading feature related to /** Singleton to manage special loading feature related to
* unique alias assignment * unique alias assignment
*/ */
class CPrimitiveContext class NLLIGO_API CPrimitiveContext
{ {
static CPrimitiveContext *_Instance; static CPrimitiveContext *_Instance;

@ -39,7 +39,7 @@ class CLigoConfig;
* \author Nevrax France * \author Nevrax France
* \date 2002 * \date 2002
*/ */
class CPrimitiveClass class NLLIGO_API CPrimitiveClass
{ {
public: public:
@ -127,7 +127,7 @@ public:
}; };
// Parameter description // Parameter description
class CParameter : public CInitParameters class NLLIGO_API CParameter : public CInitParameters
{ {
public: public:
CParameter () {} CParameter () {}

@ -38,7 +38,7 @@ class IPrimitive;
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class CPrimitiveConfigurations class NLLIGO_API CPrimitiveConfigurations
{ {
public: public:

@ -361,10 +361,10 @@ void filterPrimitiveChilds(IPrimitive *parent, Pred &predicate, TPrimitiveSet &r
* return a unique node because there is no name * return a unique node because there is no name
* uniqueness constraint in the primitive system. * uniqueness constraint in the primitive system.
*/ */
std::string buildPrimPath(const IPrimitive *prim); NLLIGO_API std::string buildPrimPath(const IPrimitive *prim);
/** Return a set of primitive that match a given path*/ /** Return a set of primitive that match a given path*/
void selectPrimByPath(IPrimitive *rootNode, const std::string &path, TPrimitiveSet &result); NLLIGO_API void selectPrimByPath(IPrimitive *rootNode, const std::string &path, TPrimitiveSet &result);
} // namespace NLLIGO } // namespace NLLIGO

@ -38,7 +38,7 @@ class CMaterial;
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class CTransition class NLLIGO_API CTransition
{ {
public: public:

@ -45,7 +45,7 @@ namespace NLLIGO
// *************************************************************************** // ***************************************************************************
class CZoneBankElement class NLLIGO_API CZoneBankElement
{ {
// Category stuff // Category stuff
@ -87,7 +87,7 @@ public:
// *************************************************************************** // ***************************************************************************
class CZoneBank class NLLIGO_API CZoneBank
{ {
std::map<std::string,CZoneBankElement> _ElementsMap; std::map<std::string,CZoneBankElement> _ElementsMap;

@ -43,7 +43,7 @@ class CLigoConfig;
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class CZoneEdge class NLLIGO_API CZoneEdge
{ {
public: public:

@ -33,7 +33,7 @@ namespace NLLIGO
// *************************************************************************** // ***************************************************************************
struct SPiece struct NLLIGO_API SPiece
{ {
sint32 w, h; // Max 255x255 sint32 w, h; // Max 255x255
std::vector<uint8> Tab; std::vector<uint8> Tab;
@ -43,7 +43,7 @@ struct SPiece
// *************************************************************************** // ***************************************************************************
class CZoneRegion class NLLIGO_API CZoneRegion
{ {
public: public:

@ -37,7 +37,7 @@ class CLigoError;
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class CZoneTemplate class NLLIGO_API CZoneTemplate
{ {
public: public:

@ -544,7 +544,7 @@ typedef uint16 ucchar;
#define NL_DECL_DLLIMP #define NL_DECL_DLLIMP
#endif #endif
// TODO: Move this within libraries? // TODO: Move this within libraries.
#ifdef NL_DLLEXP #ifdef NL_DLLEXP
#ifdef NLMISC_DLLEXP #ifdef NLMISC_DLLEXP
#define NLMISC_API NL_DECL_DLLEXP #define NLMISC_API NL_DECL_DLLEXP
@ -561,10 +561,16 @@ typedef uint16 ucchar;
#else #else
#define NLGEORGES_API NL_DECL_DLLIMP #define NLGEORGES_API NL_DECL_DLLIMP
#endif #endif
#ifdef NLLIGO_DLLEXP
#define NLLIGO_API NL_DECL_DLLEXP
#else
#define NLLIGO_API NL_DECL_DLLIMP
#endif
#else #else
#define NLMISC_API #define NLMISC_API
#define NLSOUND_LOWLEVEL_API #define NLSOUND_LOWLEVEL_API
#define NLGEORGES_API #define NLGEORGES_API
#define NLLIGO_API
#endif #endif
// To define a 64bits constant; ie: UINT64_CONSTANT(0x123456781234) // To define a 64bits constant; ie: UINT64_CONSTANT(0x123456781234)

@ -1,7 +1,7 @@
FILE(GLOB SRC *.cpp *.h) FILE(GLOB SRC *.cpp *.h)
FILE(GLOB HEADERS ../../include/nel/ligo/*.h) FILE(GLOB HEADERS ../../include/nel/ligo/*.h)
NL_TARGET_LIB(nelligo ${HEADERS} ${SRC}) NL_TARGET_LIB2(nelligo ${HEADERS} ${SRC})
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
@ -11,6 +11,10 @@ NL_ADD_RUNTIME_FLAGS(nelligo)
NL_ADD_LIB_SUFFIX(nelligo) NL_ADD_LIB_SUFFIX(nelligo)
IF(WIN32 AND NOT WITH_STATIC2)
ADD_DEFINITIONS(-DNLLIGO_DLLEXP)
ENDIF()
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
IF(WITH_PCH) IF(WITH_PCH)

Loading…
Cancel
Save