Core/Shared: Converted the shared library to a shared library ,-).

* There is still the possibility to static link against shared.
This commit is contained in:
Naios
2016-03-24 01:29:00 +01:00
parent 6cfea2d8f7
commit 25b0e743b1
5 changed files with 23 additions and 9 deletions
+14
View File
@@ -21,6 +21,8 @@ endif()
GroupSources(${CMAKE_CURRENT_SOURCE_DIR})
add_definitions(-DTRINITY_API_EXPORT_SHARED)
add_library(shared
${PRIVATE_SOURCES}
${PRIVATE_PCH_SOURCE}
@@ -48,6 +50,18 @@ set_target_properties(shared
FOLDER
"server")
if( BUILD_SHARED_LIBS )
if( UNIX )
install(TARGETS shared
LIBRARY
DESTINATION lib)
elseif( WIN32 )
install(TARGETS shared
RUNTIME
DESTINATION "${CMAKE_INSTALL_PREFIX}")
endif()
endif()
# Generate precompiled header
if (USE_COREPCH)
add_cxx_pch(shared ${PRIVATE_PCH_HEADER} ${PRIVATE_PCH_SOURCE})
@@ -24,7 +24,7 @@
#include <cassert>
#include <list>
class DB2FileLoader
class TC_SHARED_API DB2FileLoader
{
public:
DB2FileLoader();
@@ -114,7 +114,7 @@ private:
int unk5; // WDB2
};
class DB2DatabaseLoader
class TC_SHARED_API DB2DatabaseLoader
{
public:
explicit DB2DatabaseLoader(std::string const& storageName) : _storageName(storageName) { }
+1 -1
View File
@@ -23,7 +23,7 @@
#include "Utilities/ByteConverter.h"
#include <cassert>
class DBCFileLoader
class TC_SHARED_API DBCFileLoader
{
public:
DBCFileLoader();
+4 -4
View File
@@ -37,7 +37,7 @@
class MessageBuffer;
// Root of ByteBuffer exception hierarchy
class ByteBufferException : public std::exception
class TC_SHARED_API ByteBufferException : public std::exception
{
public:
~ByteBufferException() throw() { }
@@ -51,7 +51,7 @@ private:
std::string msg_;
};
class ByteBufferPositionException : public ByteBufferException
class TC_SHARED_API ByteBufferPositionException : public ByteBufferException
{
public:
ByteBufferPositionException(bool add, size_t pos, size_t size, size_t valueSize);
@@ -59,7 +59,7 @@ public:
~ByteBufferPositionException() throw() { }
};
class ByteBufferSourceException : public ByteBufferException
class TC_SHARED_API ByteBufferSourceException : public ByteBufferException
{
public:
ByteBufferSourceException(size_t pos, size_t size, size_t valueSize);
@@ -67,7 +67,7 @@ public:
~ByteBufferSourceException() throw() { }
};
class ByteBuffer
class TC_SHARED_API ByteBuffer
{
public:
static size_t const DEFAULT_SIZE = 0x1000;
+2 -2
View File
@@ -41,7 +41,7 @@ enum RealmFlags
namespace Battlenet
{
struct RealmHandle
struct TC_SHARED_API RealmHandle
{
RealmHandle() : Region(0), Site(0), Realm(0) { }
RealmHandle(uint8 region, uint8 battlegroup, uint32 index)
@@ -78,7 +78,7 @@ enum RealmType
};
// Storage object for a realm
struct Realm
struct TC_SHARED_API Realm
{
Battlenet::RealmHandle Id;
uint32 Build;