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

* There is still the possibility to static link against shared.

(cherry picked from commit 25b0e743b1)
This commit is contained in:
Naios
2016-03-11 16:01:32 +01:00
parent 205556b226
commit 522f769fa3
3 changed files with 19 additions and 5 deletions

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}
@@ -47,6 +49,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})

View File

@@ -37,7 +37,7 @@ enum DbcFieldFormat
FT_SQL_ABSENT='a' //Used in sql format to mark column absent in sql dbc
};
class DBCFileLoader
class TC_SHARED_API DBCFileLoader
{
public:
DBCFileLoader();

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:
const static size_t DEFAULT_SIZE = 0x1000;