
set(SHARED_SOURCES
	../ChatAPI/AvatarIteratorCore.cpp
	../ChatAPI/AvatarIteratorCore.h
	../ChatAPI/AvatarListItem.h
	../ChatAPI/AvatarListItemCore.cpp
	../ChatAPI/AvatarListItemCore.h
	../ChatAPI/ChatAPI.cpp
	../ChatAPI/ChatAPI.h
	../ChatAPI/ChatAPICore.cpp
	../ChatAPI/ChatAPICore.h
	../ChatAPI/ChatAvatar.cpp
	../ChatAPI/ChatAvatar.h
	../ChatAPI/ChatAvatarCore.cpp
	../ChatAPI/ChatAvatarCore.h
	../ChatAPI/ChatEnum.cpp
	../ChatAPI/ChatEnum.h
	../ChatAPI/ChatFriendStatus.h
	../ChatAPI/ChatFriendStatusCore.cpp
	../ChatAPI/ChatFriendStatusCore.h
	../ChatAPI/ChatIgnoreStatus.h
	../ChatAPI/ChatIgnoreStatusCore.cpp
	../ChatAPI/ChatIgnoreStatusCore.h
	../ChatAPI/ChatRoom.cpp
	../ChatAPI/ChatRoom.h
	../ChatAPI/ChatRoomCore.cpp
	../ChatAPI/ChatRoomCore.h
	../ChatAPI/Message.cpp
	../ChatAPI/Message.h
	../ChatAPI/PersistentMessage.cpp
	../ChatAPI/PersistentMessage.h
	../ChatAPI/PersistentMessageCore.h
	../ChatAPI/Request.cpp
	../ChatAPI/Request.h
	../ChatAPI/Response.cpp
	../ChatAPI/Response.h
	../ChatAPI/RoomParamsCore.h
	../ChatAPI/RoomSummaryCore.h

	../../utils/Base/Archive.cpp
	../../utils/Base/Archive.h
	../../utils/Base/AutoLog.cpp
	../../utils/Base/AutoLog.h
	../../utils/Base/Base.cpp
	../../utils/Base/Base.h
	../../utils/Base/Base64.cpp
	../../utils/Base/Base64.h
	../../utils/Base/BlockAllocator.h
	../../utils/Base/ccspanutil.cpp
	../../utils/Base/ccspanutil.h
	../../utils/Base/CmdLine.cpp
	../../utils/Base/CmdLine.h
	../../utils/Base/Config.cpp
	../../utils/Base/Config.h
	../../utils/Base/Event.h
	../../utils/Base/Logger.cpp
	../../utils/Base/Logger.h
	../../utils/Base/MD5.cpp
	../../utils/Base/MD5.h
	../../utils/Base/Mutex.h
	../../utils/Base/Platform.h
	../../utils/Base/ScopeLock.cpp
	../../utils/Base/ScopeLock.h
	../../utils/Base/Statistics.cpp
	../../utils/Base/Statistics.h
	../../utils/Base/TemplateBlockAllocator.h
	../../utils/Base/TemplateObjectAllocator.h
	../../utils/Base/Thread.h
	../../utils/Base/Types.h
	../../utils/Base/WideString.h

	../../utils/UdpLibrary/UdpConnection.cpp
	../../utils/UdpLibrary/UdpConnection.h
	../../utils/UdpLibrary/UdpDriver.h
	../../utils/UdpLibrary/UdpHandler.h
	../../utils/UdpLibrary/UdpHashTable.h
	../../utils/UdpLibrary/UdpHelper.h
	../../utils/UdpLibrary/UdpLibrary.cpp
	../../utils/UdpLibrary/UdpLibrary.h
	../../utils/UdpLibrary/UdpLinkedList.h
	../../utils/UdpLibrary/UdpLogicalPacket.cpp
	../../utils/UdpLibrary/UdpLogicalPacket.h
	../../utils/UdpLibrary/UdpManager.cpp
	../../utils/UdpLibrary/UdpManager.h
	../../utils/UdpLibrary/UdpMisc.cpp
	../../utils/UdpLibrary/UdpMisc.h
	../../utils/UdpLibrary/UdpPriority.h
	../../utils/UdpLibrary/UdpReliableChannel.cpp
	../../utils/UdpLibrary/UdpReliableChannel.h
	../../utils/UdpLibrary/UdpTypes.h

	../../utils/Unicode/FirstUnicode.cpp
	../../utils/Unicode/FirstUnicode.h
	../../utils/Unicode/Unicode.cpp
	../../utils/Unicode/Unicode.h
	../../utils/Unicode/UnicodeBlocks.cpp
	../../utils/Unicode/UnicodeBlocks.h
	../../utils/Unicode/UnicodeCharacterData.cpp
	../../utils/Unicode/UnicodeCharacterData.h
	../../utils/Unicode/UnicodeCharacterDataMap.cpp
	../../utils/Unicode/UnicodeCharacterDataMap.h
	../../utils/Unicode/UnicodeCharTraits.cpp
	../../utils/Unicode/UnicodeUtils.cpp
	../../utils/Unicode/UnicodeUtils.h
	../../utils/Unicode/utf8.cpp
	../../utils/Unicode/utf8.h

	../../utils/GenericAPI/GenericApiCore.cpp
	../../utils/GenericAPI/GenericApiCore.h
	../../utils/GenericAPI/GenericConnection.cpp
	../../utils/GenericAPI/GenericConnection.h
	../../utils/GenericAPI/GenericMessage.cpp
	../../utils/GenericAPI/GenericMessage.h
)

if(WIN32)
	set(PLATFORM_SOURCES
		../../utils/Base/win32/Archive.h
		../../utils/Base/win32/BlockAllocator.cpp
		../../utils/Base/win32/Event.cpp
		../../utils/Base/win32/Event.h
		../../utils/Base/win32/Mutex.cpp
		../../utils/Base/win32/Mutex.h
		../../utils/Base/win32/Platform.cpp
		../../utils/Base/win32/Platform.h
		../../utils/Base/win32/Thread.cpp
		../../utils/Base/win32/Thread.h
		../../utils/Base/win32/Types.h

		../../utils/UdpLibrary/UdpDriverWindows.cpp
	)

	include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../utils/Base/win32)
else()
	set(PLATFORM_SOURCES
		../../utils/Base/linux/Archive.h
		../../utils/Base/linux/BlockAllocator.cpp
		../../utils/Base/linux/Event.cpp
		../../utils/Base/linux/Event.h
		../../utils/Base/linux/Mutex.cpp
		../../utils/Base/linux/Mutex.h
		../../utils/Base/linux/Platform.cpp
		../../utils/Base/linux/Platform.h
		../../utils/Base/linux/Thread.cpp
		../../utils/Base/linux/Thread.h
		../../utils/Base/linux/Types.h

		../../utils/UdpLibrary/UdpDriverLinux.cpp
	)

	include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../utils/Base/linux)
endif()

add_definitions(-DEXTERNAL_DISTRO -DNAMESPACE=ChatSystem -D_REENTRANT)

add_library(ChatMono
	${SHARED_SOURCES}
	${PLATFORM_SOURCES}
)
