From 9c7159776a75cd860eafc56455e25e213d95d854 Mon Sep 17 00:00:00 2001 From: Urioxis Date: Tue, 5 May 2009 17:35:58 +0000 Subject: [PATCH] The core now uses cmake. Please update CMakeLists.txt if any files are added/removed. Also started adapting the core to be GNU compatible. It'll be done in small steps, often committed as I don't have lots of time and can't risk my copy becoming out of date. Jooles --- src/core/CMakeLists.txt | 90 +++++++++++++++++++++++++++++++++++++++++ src/core/config.h | 5 ++- 2 files changed, 94 insertions(+), 1 deletion(-) create mode 100644 src/core/CMakeLists.txt diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt new file mode 100644 index 000000000..85ea29306 --- /dev/null +++ b/src/core/CMakeLists.txt @@ -0,0 +1,90 @@ +project( core ) + +SET (CMAKE_BUILD_TYPE DEBUG) + +set(SOURCES + pch.cpp + pch.hpp + PlaybackQueue.cpp + Common.cpp + Crypt.cpp + Image.cpp + MessageQueue.cpp + Preferences.cpp + ThreadHelper.cpp + tracklist/Base.cpp + tracklist/LibraryList.cpp + tracklist/MultiLibraryList.cpp + Indexer.cpp + LibraryFactory.cpp + Query/Base.cpp + Query/Factory.cpp + Query/ListBase.cpp + Query/ListSelection.cpp + Query/SortTracks.cpp + Query/SortTracksWithData.cpp + Query/TrackMetadata.cpp + Library/Base.cpp + Library/LocalDB.cpp + Library/Remote.cpp + db/CachedStatement.cpp + db/Connection.cpp + db/ScopedTransaction.cpp + db/Statement.cpp + MetadataValue.cpp + MetaKey.cpp + NonLibraryTrackHelper.cpp + PluginFactory.cpp + audio/Buffer.cpp + audio/Player.cpp + audio/Stream.cpp + audio/Transport.cpp + server/Connection.cpp + Server.cpp + server/User.cpp + server/UserSession.cpp + xml/Node.cpp + xml/Parser.cpp + xml/ParserNode.cpp + xml/Socket.cpp + xml/Writer.cpp + xml/WriterNode.cpp + http/RequestParser.cpp + http/Responder.cpp + http/Server.cpp + http/TrackSender.cpp + filestreams/Factory.cpp + filestreams/LocalFileStream.cpp + GenericTrack.cpp + IndexerTrack.cpp + LibraryTrack.cpp + Track.cpp + TrackFactory.cpp +) + +set (WINDOWS_EXTRAS + +) + +if(CMAKE_SYSTEM_NAME MATCHES "Windows") + add_definitions(-DWIN32) + if(NOT DEFINED MINGW) + SET(SOURCES ${SOURCES} ${WINDOWS_EXTRAS}) + endif(NOT DEFINED MINGW) +endif(CMAKE_SYSTEM_NAME MATCHES "Windows") + +include_directories( + .. + ../3rdparty/include + ../3rdparty/include/jpeg-6b + +) + +add_definitions( + -DXML_STATIC + -D_CRT_SECURE_NO_DEPRECATE + -D_DEBUG +) + +add_library( core STATIC ${SOURCES} ) + diff --git a/src/core/config.h b/src/core/config.h index c532c5bd7..db75d3765 100644 --- a/src/core/config.h +++ b/src/core/config.h @@ -52,12 +52,15 @@ #else #define DLLEXPORT __declspec( dllimport ) #endif + typedef unsigned __int64 UINT64; +#else + typedef unsigned long long UINT64; + typedef long long __int64; //TODO: Is this necessary? #endif // WIN32 //////////////////////////////// -typedef unsigned __int64 UINT64; typedef unsigned int DBINT; typedef UINT64 VERSION; typedef unsigned int DBTIME;