1
0
mirror of https://github.com/tomahawk-player/tomahawk.git synced 2025-08-04 21:27:58 +02:00

Adjust cmake to build again and fix include errors

These are partly hacks - I split the commit for referencing the hacks
afterwards
This commit is contained in:
Dominik Schmidt
2013-05-24 11:23:22 +02:00
parent 4a443bfb9f
commit a0738ccd76
20 changed files with 52 additions and 35 deletions

View File

@@ -310,7 +310,6 @@ SET( TOMAHAWK_LIBRARIES tomahawklib )
ADD_SUBDIRECTORY( thirdparty ) ADD_SUBDIRECTORY( thirdparty )
ADD_SUBDIRECTORY( src ) ADD_SUBDIRECTORY( src )
ADD_SUBDIRECTORY( src/libtomahawk )
ADD_SUBDIRECTORY( admin ) ADD_SUBDIRECTORY( admin )
if( BUILD_TESTS ) if( BUILD_TESTS )

13
src/CMakeLists.txt Normal file
View File

@@ -0,0 +1,13 @@
setup_qt()
add_subdirectory( libtomahawk )
include_directories( ${CMAKE_CURRENT_BINARY_DIR}/libtomahawk )
include_directories( ${CMAKE_CURRENT_LIST_DIR}/libtomahawk )
add_subdirectory( tomahawk )
add_subdirectory( breakpad/CrashReporter/ )
add_subdirectory( accounts )
add_subdirectory( infoplugins )

View File

@@ -20,8 +20,8 @@
#include "TwitterAccount.h" #include "TwitterAccount.h"
#include "TwitterConfigWidget.h" #include "TwitterConfigWidget.h"
#include "accounts/twitter/TomahawkOAuthTwitter.h" #include "TomahawkOAuthTwitter.h"
#include "libtomahawk/infosystem/InfoSystem.h" #include "infosystem/InfoSystem.h"
#include "utils/Logger.h" #include "utils/Logger.h"
#include "sip/SipPlugin.h" #include "sip/SipPlugin.h"

View File

@@ -20,7 +20,7 @@
#include "TwitterInfoPlugin.h" #include "TwitterInfoPlugin.h"
#include "accounts/twitter/TwitterAccount.h" #include "TwitterAccount.h"
#include "GlobalActionManager.h" #include "GlobalActionManager.h"
#include "utils/Logger.h" #include "utils/Logger.h"

View File

@@ -21,7 +21,7 @@
#define TWITTERINFOPLUGIN_H #define TWITTERINFOPLUGIN_H
#include "infosystem/InfoSystem.h" #include "infosystem/InfoSystem.h"
#include "accounts/twitter/TomahawkOAuthTwitter.h" #include "TomahawkOAuthTwitter.h"
#include <QTweetLib/qtweetuser.h> #include <QTweetLib/qtweetuser.h>
#include <QTweetLib/qtweetstatus.h> #include <QTweetLib/qtweetstatus.h>

View File

@@ -20,7 +20,8 @@
#ifndef ChartsPlugin_H #ifndef ChartsPlugin_H
#define ChartsPlugin_H #define ChartsPlugin_H
#include "infoplugins/InfoPluginDllMacro.h" #include "../../InfoPluginDllMacro.h"
#include "infosystem/InfoSystem.h" #include "infosystem/InfoSystem.h"
#include "infosystem/InfoSystemWorker.h" #include "infosystem/InfoSystemWorker.h"
#include <QNetworkReply> #include <QNetworkReply>

View File

@@ -22,7 +22,8 @@
#include "Typedefs.h" #include "Typedefs.h"
#include "infosystem/InfoSystem.h" #include "infosystem/InfoSystem.h"
#include "infosystem/InfoSystemWorker.h" #include "infosystem/InfoSystemWorker.h"
#include "infoplugins/InfoPluginDllMacro.h"
#include "../../InfoPluginDllMacro.h"
class QNetworkReply; class QNetworkReply;

View File

@@ -20,7 +20,8 @@
#ifndef ECHONESTPLUGIN_H #ifndef ECHONESTPLUGIN_H
#define ECHONESTPLUGIN_H #define ECHONESTPLUGIN_H
#include "infoplugins/InfoPluginDllMacro.h" #include "../../InfoPluginDllMacro.h"
#include "infosystem/InfoSystem.h" #include "infosystem/InfoSystem.h"
#include "infosystem/InfoSystemWorker.h" #include "infosystem/InfoSystemWorker.h"
#include "echonest/Artist.h" #include "echonest/Artist.h"

View File

@@ -20,7 +20,8 @@
#ifndef HYPEMPLUGIN_H #ifndef HYPEMPLUGIN_H
#define HYPEMPLUGIN_H #define HYPEMPLUGIN_H
#include "infoplugins/InfoPluginDllMacro.h" #include "../../InfoPluginDllMacro.h"
#include "infosystem/InfoSystem.h" #include "infosystem/InfoSystem.h"
#include "infosystem/InfoSystemWorker.h" #include "infosystem/InfoSystemWorker.h"
#include <QNetworkReply> #include <QNetworkReply>

View File

@@ -22,7 +22,8 @@
#include "infosystem/InfoSystem.h" #include "infosystem/InfoSystem.h"
#include "infosystem/InfoSystemWorker.h" #include "infosystem/InfoSystemWorker.h"
#include "infoplugins/InfoPluginDllMacro.h"
#include "../../InfoPluginDllMacro.h"
class QNetworkReply; class QNetworkReply;

View File

@@ -22,7 +22,9 @@
#include "infosystem/InfoSystem.h" #include "infosystem/InfoSystem.h"
#include "infosystem/InfoSystemWorker.h" #include "infosystem/InfoSystemWorker.h"
#include "infoplugins/InfoPluginDllMacro.h"
#include "../../InfoPluginDllMacro.h"
class QNetworkReply; class QNetworkReply;

View File

@@ -22,7 +22,9 @@
#include "infosystem/InfoSystem.h" #include "infosystem/InfoSystem.h"
#include "infosystem/InfoSystemWorker.h" #include "infosystem/InfoSystemWorker.h"
#include "infoplugins/InfoPluginDllMacro.h"
#include "../../InfoPluginDllMacro.h"
#include <QVariantMap> #include <QVariantMap>
#include <QtNetwork/QNetworkReply> #include <QtNetwork/QNetworkReply>
#include <QtCore/QObject> #include <QtCore/QObject>

View File

@@ -21,7 +21,9 @@
#define ROVIPLUGIN_H #define ROVIPLUGIN_H
#include "infosystem/InfoSystem.h" #include "infosystem/InfoSystem.h"
#include "infoplugins/InfoPluginDllMacro.h"
#include "../../InfoPluginDllMacro.h"
#include <QNetworkReply> #include <QNetworkReply>

View File

@@ -22,7 +22,9 @@
#include "infosystem/InfoSystem.h" #include "infosystem/InfoSystem.h"
#include "infosystem/InfoSystemWorker.h" #include "infosystem/InfoSystemWorker.h"
#include "infoplugins/InfoPluginDllMacro.h"
#include "../../InfoPluginDllMacro.h"
#include <QNetworkReply> #include <QNetworkReply>
#include <QObject> #include <QObject>

View File

@@ -20,7 +20,8 @@
#ifndef FDONOTIFYPLUGIN_H #ifndef FDONOTIFYPLUGIN_H
#define FDONOTIFYPLUGIN_H #define FDONOTIFYPLUGIN_H
#include "infoplugins/InfoPluginDllMacro.h" #include "../../InfoPluginDllMacro.h"
#include "infosystem/InfoSystem.h" #include "infosystem/InfoSystem.h"
#include <QDBusMessage> #include <QDBusMessage>

View File

@@ -24,7 +24,9 @@
#include "Source.h" #include "Source.h"
#include "audio/AudioEngine.h" #include "audio/AudioEngine.h"
#include "infosystem/InfoSystem.h" #include "infosystem/InfoSystem.h"
#include "infoplugins/InfoPluginDllMacro.h"
#include "../../InfoPluginDllMacro.h"
#include <QObject> #include <QObject>
#include <QVariant> #include <QVariant>

View File

@@ -20,7 +20,8 @@
#ifndef ADIUMPLUGIN_H #ifndef ADIUMPLUGIN_H
#define ADIUMPLUGIN_H #define ADIUMPLUGIN_H
#include "infoplugins/InfoPluginDllMacro.h" #include "../../InfoPluginDllMacro.h"
#include "infosystem/InfoSystem.h" #include "infosystem/InfoSystem.h"
#include <QNetworkAccessManager> #include <QNetworkAccessManager>

View File

@@ -1,16 +1,14 @@
project( tomahawklib ) project( tomahawklib )
setup_qt()
add_definitions( ${QT_DEFINITIONS} ) add_definitions( ${QT_DEFINITIONS} )
add_definitions( -DQT_SHARED ) add_definitions( -DQT_SHARED )
add_definitions( -DDLLEXPORT_PRO ) add_definitions( -DDLLEXPORT_PRO )
add_definitions( -DQT_SHAREDPOINTER_TRACK_POINTERS ) add_definitions( -DQT_SHAREDPOINTER_TRACK_POINTERS )
add_definitions( -DPORTFWDDLLEXPORT_STATIC ) add_definitions( -DPORTFWDDLLEXPORT_STATIC )
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../Config.h.in configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../tomahawk/Config.h.in
${CMAKE_CURRENT_BINARY_DIR}/config.h) ${CMAKE_CURRENT_BINARY_DIR}/config.h)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../TomahawkVersion.h.in configure_file(${CMAKE_CURRENT_SOURCE_DIR}/../tomahawk/TomahawkVersion.h.in
${CMAKE_CURRENT_BINARY_DIR}/TomahawkVersion.h) ${CMAKE_CURRENT_BINARY_DIR}/TomahawkVersion.h)
set( libGuiSources set( libGuiSources

View File

@@ -1,9 +1,6 @@
PROJECT( tomahawk ) PROJECT( tomahawk )
CMAKE_MINIMUM_REQUIRED( VERSION 2.8 ) CMAKE_MINIMUM_REQUIRED( VERSION 2.8 )
setup_qt()
include( AddAppIconMacro ) include( AddAppIconMacro )
# SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" ) # SET( CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}" )
@@ -93,10 +90,10 @@ SET( tomahawkUI ${tomahawkUI}
INCLUDE_DIRECTORIES( INCLUDE_DIRECTORIES(
. .
${CMAKE_CURRENT_BINARY_DIR} ${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/libtomahawk ${CMAKE_CURRENT_BINARY_DIR}/../libtomahawk
sourcetree sourcetree
libtomahawk ../libtomahawk
mac mac
${THIRDPARTY_DIR}/breakpad ${THIRDPARTY_DIR}/breakpad
@@ -132,9 +129,6 @@ IF( APPLE )
SET( tomahawkSources ${tomahawkSources} mac/TomahawkApp_Mac.mm mac/MacShortcutHandler.cpp ) SET( tomahawkSources ${tomahawkSources} mac/TomahawkApp_Mac.mm mac/MacShortcutHandler.cpp )
ENDIF( APPLE ) ENDIF( APPLE )
ADD_SUBDIRECTORY( accounts )
ADD_SUBDIRECTORY( infoplugins )
IF(QCA2_FOUND) IF(QCA2_FOUND)
INCLUDE_DIRECTORIES( ${QCA2_INCLUDE_DIR} ) INCLUDE_DIRECTORIES( ${QCA2_INCLUDE_DIR} )
ENDIF(QCA2_FOUND) ENDIF(QCA2_FOUND)
@@ -156,14 +150,10 @@ SET( final_src ${final_src} ${tomahawkMoc} ${tomahawkSources} ${trans_outfile})
IF( BUILD_GUI ) IF( BUILD_GUI )
LIST(APPEND tomahawkSources ${tomahawkSourcesGui}) LIST(APPEND tomahawkSources ${tomahawkSourcesGui})
qt_wrap_ui( tomahawkUI_H ${tomahawkUI} ) qt_wrap_ui( tomahawkUI_H ${tomahawkUI} )
IF( WITH_CRASHREPORTER )
ADD_SUBDIRECTORY( breakpad/CrashReporter )
ENDIF()
ENDIF() ENDIF()
kde4_add_app_icon( tomahawkSources "${CMAKE_SOURCE_DIR}/data/icons/tomahawk-icon-*.png" ) kde4_add_app_icon( tomahawkSources "${CMAKE_SOURCE_DIR}/data/icons/tomahawk-icon-*.png" )
qt_add_resources( RC_SRCS "../resources.qrc" ) qt_add_resources( RC_SRCS "../../resources.qrc" )
SET( final_src ${final_src} ${tomahawkUI_H} ${tomahawkMoc} ${tomahawkSources} ${RC_SRCS} ) SET( final_src ${final_src} ${tomahawkUI_H} ${tomahawkMoc} ${tomahawkSources} ${RC_SRCS} )

View File

@@ -46,7 +46,7 @@
#include "web/Api_v1.h" #include "web/Api_v1.h"
#include "SourceList.h" #include "SourceList.h"
#include "ShortcutHandler.h" #include "ShortcutHandler.h"
#include "libtomahawk/filemetadata/ScanManager.h" #include "filemetadata/ScanManager.h"
#include "TomahawkSettings.h" #include "TomahawkSettings.h"
#include "GlobalActionManager.h" #include "GlobalActionManager.h"
#include "database/LocalCollection.h" #include "database/LocalCollection.h"