mirror of
https://github.com/tomahawk-player/tomahawk.git
synced 2025-04-22 08:52:12 +02:00
Fix OS X linking problem and plugin loading on OS X and Windows.
This commit is contained in:
parent
d74dd577fd
commit
e882c4f0a9
src/sip
@ -28,6 +28,18 @@ SipHandler::loadPlugins()
|
||||
qDebug() << TomahawkApp::instance()->applicationDirPath();
|
||||
QDir pluginsDir( TomahawkApp::instance()->applicationDirPath() );
|
||||
|
||||
#if defined(Q_OS_WIN)
|
||||
if (pluginsDir.dirName().toLower() == "debug" || pluginsDir.dirName().toLower() == "release")
|
||||
pluginsDir.cdUp();
|
||||
#elif defined(Q_OS_MAC)
|
||||
if (pluginsDir.dirName() == "MacOS") {
|
||||
pluginsDir.cdUp();
|
||||
pluginsDir.cdUp();
|
||||
pluginsDir.cdUp();
|
||||
}
|
||||
#endif
|
||||
pluginsDir.cd("plugins");
|
||||
|
||||
foreach ( QString fileName, pluginsDir.entryList( QDir::Files ) )
|
||||
{
|
||||
QPluginLoader loader( pluginsDir.absoluteFilePath( fileName ) );
|
||||
|
@ -27,4 +27,8 @@ target_link_libraries( sip_jabber
|
||||
${GLOOX_LIBS}
|
||||
)
|
||||
|
||||
IF( APPLE )
|
||||
SET( CMAKE_SHARED_LINKER_FLAGS ${CMAKE_SHARED_LINKER_FLAGS} "-undefined dynamic_lookup" )
|
||||
ENDIF( APPLE )
|
||||
|
||||
install( TARGETS sip_jabber DESTINATION . )
|
||||
|
Loading…
x
Reference in New Issue
Block a user