Skip to content

Commit fb089f6

Browse files
committed
Merge pull request #27 from muesli/master
Build system & ifdef fixes
2 parents e4952ff + d9bea7b commit fb089f6

File tree

3 files changed

+7
-5
lines changed

3 files changed

+7
-5
lines changed

CMakeLists.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,9 @@ if(Qt5Core_DIR)
3838
set(LASTFM_LIB_VERSION_SUFFIX 5)
3939
message(STATUS "Found Qt5! Please keep in mind, this is highly experimental and not our main development target..")
4040
include_directories(${Qt5Core_INCLUDE_DIRS})
41-
find_package(Qt5DBus REQUIRED)
41+
if(UNIX AND NOT APPLE)
42+
find_package(Qt5DBus REQUIRED)
43+
endif()
4244

4345
# macro(qt_wrap_ui)
4446
# qt5_wrap_ui(${ARGN})

src/InternetConnectionMonitor.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,11 @@ lastfm::InternetConnectionMonitor::createNetworkConnectionMonitor()
131131
{
132132
NetworkConnectionMonitor* ncm = 0;
133133

134-
#ifdef defined(Q_OS_MAC)
134+
#if defined(Q_OS_MAC)
135135
ncm = new MNetworkConnectionMonitor( this );
136136
#elif defined(Q_OS_WIN) && ! defined __MINGW32__
137137
ncm = new WNetworkConnectionMonitor( this );
138-
#elif defined(Q_OS_UNIX)
138+
#elif defined(Q_OS_LINUX)
139139
ncm = new LNetworkConnectionMonitor( this );
140140
#endif
141141

src/misc.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ static QDir dataDotDot()
6262
return QDir::home();
6363
#elif defined(Q_OS_MAC)
6464
return QDir::home().filePath( "Library/Application Support" );
65-
#elif defined(Q_OS_UNIX)
65+
#elif defined(Q_OS_LINUX) || defined(Q_OS_UNIX)
6666
return QDir::home().filePath( ".local/share" );
6767
#else
6868
return QDir::home();
@@ -199,7 +199,7 @@ lastfm::platform()
199199

200200
default: return "Unknown";
201201
}
202-
#elif defined Q_OS_UNIX
202+
#elif defined(Q_OS_LINUX) || defined(Q_OS_UNIX)
203203
return "UNIX X11";
204204
#else
205205
return "Unknown";

0 commit comments

Comments
 (0)