Support for building nlpacs as a dll

feature/nel-dll
kaetemi 6 years ago
parent f6924ed69c
commit 86655c2c88

@ -566,11 +566,17 @@ typedef uint16 ucchar;
#else #else
#define NLLIGO_API NL_DECL_DLLIMP #define NLLIGO_API NL_DECL_DLLIMP
#endif #endif
#ifdef NLPACS_DLLEXP
#define NLPACS_API NL_DECL_DLLEXP
#else
#define NLPACS_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 #define NLLIGO_API
#define NLPACS_API
#endif #endif
// To define a 64bits constant; ie: UINT64_CONSTANT(0x123456781234) // To define a 64bits constant; ie: UINT64_CONSTANT(0x123456781234)

@ -32,7 +32,7 @@ class CLocalRetriever;
/// Computation functions, returns false if false /// Computation functions, returns false if false
bool computeRetriever(CCollisionMeshBuild &cmb, NLPACS_API bool computeRetriever(CCollisionMeshBuild &cmb,
CLocalRetriever &lr, CLocalRetriever &lr,
NLMISC::CVector &translation, NLMISC::CVector &translation,
std::string &error, std::string &error,

@ -36,7 +36,7 @@ class COrderedChain;
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class COrderedChain3f class NLPACS_API COrderedChain3f
{ {
protected: protected:
friend class CChain; friend class CChain;
@ -95,7 +95,7 @@ public:
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class COrderedChain class NLPACS_API COrderedChain
{ {
protected: protected:
friend class CChain; friend class CChain;
@ -198,7 +198,7 @@ public:
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class CChain class NLPACS_API CChain
{ {
protected: protected:
friend class CRetrievableSurface; friend class CRetrievableSurface;

@ -48,7 +48,7 @@ struct EChainQuad : public NLMISC::Exception
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class CChainQuad class NLPACS_API CChainQuad
{ {
public: public:

@ -96,7 +96,7 @@ public:
} }
/// Get next element in the ot /// Get next element in the ot
CCollisionOTInfo *getNextInfo () const; NLPACS_API CCollisionOTInfo *getNextInfo () const;
private: private:
// The next cell // The next cell
@ -292,7 +292,7 @@ public:
} }
// Remove the collision from the primitives // Remove the collision from the primitives
void removeFromPrimitives (); NLPACS_API void removeFromPrimitives ();
// Get second primitive // Get second primitive
CMovePrimitive *getOtherPrimitive (CMovePrimitive *primitive) const CMovePrimitive *getOtherPrimitive (CMovePrimitive *primitive) const
@ -418,7 +418,7 @@ public:
} }
// Remove the collision from the primitives // Remove the collision from the primitives
void removeFromPrimitives (); NLPACS_API void removeFromPrimitives ();
CMovePrimitive *getOtherPrimitive (CMovePrimitive * /* primitive */) const CMovePrimitive *getOtherPrimitive (CMovePrimitive * /* primitive */) const
{ {

@ -239,7 +239,7 @@ public:
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class CCollisionSurfaceTemp class NLPACS_API CCollisionSurfaceTemp
{ {
public: public:
typedef std::pair<uint16, uint16> TExteriorEdgeIndex; typedef std::pair<uint16, uint16> TExteriorEdgeIndex;

@ -168,7 +168,7 @@ public:
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class CEdgeCollide class NLPACS_API CEdgeCollide
{ {
public: public:
enum TPointMoveProblem {ParallelEdges=0, StartOnEdge, StopOnEdge, TraverseEndPoint, EdgeNull, PointMoveProblemCount}; enum TPointMoveProblem {ParallelEdges=0, StartOnEdge, StopOnEdge, TraverseEndPoint, EdgeNull, PointMoveProblemCount};

@ -53,7 +53,7 @@ struct EEdgeQuad : public NLMISC::Exception
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class CEdgeQuad class NLPACS_API CEdgeQuad
{ {
public: public:

@ -44,7 +44,7 @@ namespace NLPACS
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class CExteriorMesh class NLPACS_API CExteriorMesh
{ {
public: public:
/// An edge of the edge list /// An edge of the edge list

@ -52,7 +52,7 @@ namespace NLPACS
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class CGlobalRetriever : public UGlobalRetriever class NLPACS_API CGlobalRetriever : public UGlobalRetriever
{ {
public: public:

@ -51,7 +51,7 @@ class CCollisionSurfaceTemp;
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class CLocalRetriever class NLPACS_API CLocalRetriever
{ {
public: public:
/** /**

@ -32,7 +32,7 @@ class CMoveElement;
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class CMoveCell class NLPACS_API CMoveCell
{ {
public: public:

@ -44,7 +44,7 @@ class CPrimitiveWorldImage;
* \date 2001 * \date 2001
*/ */
class CMoveContainer: public UMoveContainer class NLPACS_API CMoveContainer: public UMoveContainer
{ {
friend class CMovePrimitive; friend class CMovePrimitive;
friend class CPrimitiveWorldImage; friend class CPrimitiveWorldImage;

@ -40,7 +40,7 @@ namespace NLPACS
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class CMovePrimitive: public UMovePrimitive class NLPACS_API CMovePrimitive: public UMovePrimitive
{ {
private: private:
friend class CMoveContainer; friend class CMoveContainer;

@ -31,7 +31,7 @@ namespace NLPACS
* \author Nevrax France * \author Nevrax France
* \date 2002 * \date 2002
*/ */
class CPrimitiveDesc class NLPACS_API CPrimitiveDesc
{ {
public: public:
@ -85,7 +85,7 @@ public:
* \author Nevrax France * \author Nevrax France
* \date 2002 * \date 2002
*/ */
class CPrimitiveBlock : public UPrimitiveBlock class NLPACS_API CPrimitiveBlock : public UPrimitiveBlock
{ {
public: public:

@ -31,7 +31,7 @@ namespace NLPACS {
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class CPrimitiveWorldImage class NLPACS_API CPrimitiveWorldImage
{ {
public: public:

@ -45,7 +45,7 @@ enum
/** /**
* The features of the models, as floats * The features of the models, as floats
*/ */
extern float Models[NumMaxCreatureModels][NumModelCharacteristics]; NLPACS_API extern float Models[NumMaxCreatureModels][NumModelCharacteristics];
@ -56,7 +56,7 @@ extern float Models[NumMaxCreatureModels][NumModelCharacteristics];
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class CRetrievableSurface class NLPACS_API CRetrievableSurface
{ {
public: public:
/** /**

@ -39,7 +39,7 @@ namespace NLPACS
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class CRetrieverBank : public URetrieverBank class NLPACS_API CRetrieverBank : public URetrieverBank
{ {
friend class URetrieverBank; friend class URetrieverBank;

@ -44,7 +44,7 @@ const float SnapPrecision= 1024;
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class CRetrieverInstance class NLPACS_API CRetrieverInstance
{ {
public: public:
/** /**

@ -93,7 +93,7 @@ public:
}; };
// //
class CQuadBranch : public IQuadNode class NLPACS_API CQuadBranch : public IQuadNode
{ {
public: public:
enum enum
@ -142,7 +142,7 @@ public:
void serial(NLMISC::IStream &f); void serial(NLMISC::IStream &f);
}; };
class CSurfaceQuadTree class NLPACS_API CSurfaceQuadTree
{ {
protected: protected:

@ -39,7 +39,7 @@ namespace NLPACS
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class UCollisionDesc class NLPACS_API UCollisionDesc
{ {
public: public:
NLMISC::CVectorD ContactPosition; NLMISC::CVectorD ContactPosition;
@ -58,7 +58,7 @@ public:
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class UTriggerInfo class NLPACS_API UTriggerInfo
{ {
public: public:
enum enum

@ -32,7 +32,7 @@ namespace NLPACS
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class ULocalPosition class NLPACS_API ULocalPosition
{ {
public: public:
/// The id of the surface corresponding to the local position. /// The id of the surface corresponding to the local position.
@ -59,7 +59,7 @@ public:
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class UGlobalPosition class NLPACS_API UGlobalPosition
{ {
public: public:

@ -42,7 +42,7 @@ class UGlobalPosition;
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class UGlobalRetriever class NLPACS_API UGlobalRetriever
{ {
public: public:
virtual ~UGlobalRetriever() {} virtual ~UGlobalRetriever() {}

@ -48,7 +48,7 @@ class UPrimitiveBlock;
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class UMoveContainer class NLPACS_API UMoveContainer
{ {
public: public:

@ -40,7 +40,7 @@ class UGlobalPosition;
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class UMovePrimitive class NLPACS_API UMovePrimitive
{ {
public: public:

@ -36,7 +36,7 @@ namespace NLPACS
* \author Nevrax France * \author Nevrax France
* \date 2002 * \date 2002
*/ */
class UPrimitiveBlock class NLPACS_API UPrimitiveBlock
{ {
public: public:
// dtor // dtor

@ -33,7 +33,7 @@ namespace NLPACS {
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class URetrieverBank class NLPACS_API URetrieverBank
{ {
public: public:

@ -34,7 +34,7 @@ const float Vector2sAccuracy = 128.0f;
* \author Nevrax France * \author Nevrax France
* \date 2001 * \date 2001
*/ */
class CVector2s class NLPACS_API CVector2s
{ {
private: private:
// safely cast a fixed64 into a fixed16 // safely cast a fixed64 into a fixed16

@ -1,7 +1,7 @@
FILE(GLOB SRC *.cpp *.h) FILE(GLOB SRC *.cpp *.h)
FILE(GLOB HEADERS ../../include/nel/georges/*.h) FILE(GLOB HEADERS ../../include/nel/georges/*.h)
# SOURCE_GROUP(headers FILES ${HEADERS}) SOURCE_GROUP("" FILES ${HEADERS} ${SRC})
NL_TARGET_LIB2(nelgeorges ${HEADERS} ${SRC}) NL_TARGET_LIB2(nelgeorges ${HEADERS} ${SRC})

@ -1,6 +1,8 @@
FILE(GLOB SRC *.cpp *.h) FILE(GLOB SRC *.cpp *.h)
FILE(GLOB HEADERS ../../include/nel/ligo/*.h) FILE(GLOB HEADERS ../../include/nel/ligo/*.h)
SOURCE_GROUP("" FILES ${HEADERS} ${SRC})
NL_TARGET_LIB2(nelligo ${HEADERS} ${SRC}) NL_TARGET_LIB2(nelligo ${HEADERS} ${SRC})
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})

@ -1,7 +1,9 @@
FILE(GLOB SRC *.cpp *.h) FILE(GLOB SRC *.cpp *.h)
FILE(GLOB HEADERS ../../include/nel/pacs/*.h) FILE(GLOB HEADERS ../../include/nel/pacs/*.h)
NL_TARGET_LIB(nelpacs ${HEADERS} ${SRC}) SOURCE_GROUP("" FILES ${HEADERS} ${SRC})
NL_TARGET_LIB2(nelpacs ${HEADERS} ${SRC})
INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR}) INCLUDE_DIRECTORIES(${LIBXML2_INCLUDE_DIR})
@ -11,6 +13,10 @@ NL_ADD_RUNTIME_FLAGS(nelpacs)
NL_ADD_LIB_SUFFIX(nelpacs) NL_ADD_LIB_SUFFIX(nelpacs)
IF(WIN32 AND NOT WITH_STATIC2)
ADD_DEFINITIONS(-DNLPACS_DLLEXP)
ENDIF()
ADD_DEFINITIONS(${LIBXML2_DEFINITIONS}) ADD_DEFINITIONS(${LIBXML2_DEFINITIONS})
IF(WITH_PCH) IF(WITH_PCH)

@ -1,6 +1,8 @@
FILE(GLOB SRC *.cpp *.h) FILE(GLOB SRC *.cpp *.h)
FILE(GLOB HEADERS ../../../include/nel/sound/driver/*.h) FILE(GLOB HEADERS ../../../include/nel/sound/driver/*.h)
SOURCE_GROUP("" FILES ${HEADERS} ${SRC})
NL_TARGET_LIB2(nelsnd_lowlevel ${HEADERS} ${SRC}) NL_TARGET_LIB2(nelsnd_lowlevel ${HEADERS} ${SRC})
TARGET_LINK_LIBRARIES(nelsnd_lowlevel nelmisc) TARGET_LINK_LIBRARIES(nelsnd_lowlevel nelmisc)

Loading…
Cancel
Save