Made Lms API support conditional
This commit is contained in:
+13
-8
@@ -26,17 +26,9 @@ lms_SOURCES = \
|
||||
$(srcdir)/logger/Logger.cpp \
|
||||
$(srcdir)/metadata/AvFormat.cpp \
|
||||
$(srcdir)/metadata/Utils.cpp \
|
||||
$(srcdir)/remote/server/Connection.cpp \
|
||||
$(srcdir)/remote/server/ConnectionManager.cpp \
|
||||
$(srcdir)/remote/server/AudioCollectionRequestHandler.cpp \
|
||||
$(srcdir)/remote/server/AuthRequestHandler.cpp \
|
||||
$(srcdir)/remote/server/MediaRequestHandler.cpp \
|
||||
$(srcdir)/remote/server/RequestHandler.cpp \
|
||||
$(srcdir)/remote/server/Server.cpp \
|
||||
$(srcdir)/service/ServiceManager.cpp \
|
||||
$(srcdir)/service/DatabaseUpdateService.cpp \
|
||||
$(srcdir)/service/UserInterfaceService.cpp \
|
||||
$(srcdir)/service/RemoteServerService.cpp \
|
||||
$(srcdir)/transcode/AvConvTranscoder.cpp \
|
||||
$(srcdir)/transcode/Format.cpp \
|
||||
$(srcdir)/transcode/Parameters.cpp \
|
||||
@@ -73,6 +65,17 @@ lms_SOURCES = \
|
||||
$(srcdir)/ui/settings/SettingsUserFormView.cpp \
|
||||
$(srcdir)/ui/settings/SettingsUsers.cpp
|
||||
|
||||
if LMSAPI
|
||||
lms_SOURCES += \
|
||||
$(srcdir)/remote/server/Connection.cpp \
|
||||
$(srcdir)/remote/server/ConnectionManager.cpp \
|
||||
$(srcdir)/remote/server/AudioCollectionRequestHandler.cpp \
|
||||
$(srcdir)/remote/server/AuthRequestHandler.cpp \
|
||||
$(srcdir)/remote/server/MediaRequestHandler.cpp \
|
||||
$(srcdir)/remote/server/RequestHandler.cpp \
|
||||
$(srcdir)/remote/server/Server.cpp \
|
||||
$(srcdir)/service/RemoteServerService.cpp
|
||||
|
||||
nodist_lms_SOURCES = \
|
||||
$(builddir)/auth.pb.cc \
|
||||
$(builddir)/auth.pb.h \
|
||||
@@ -112,5 +115,7 @@ MOSTLYCLEANFILES = \
|
||||
%.pb.cc %.pb.h: $(srcdir)/remote/proto/%.proto
|
||||
$(PROTOC) --proto_path=$(srcdir)/remote/proto/ --cpp_out=$(builddir)/ $^
|
||||
|
||||
endif
|
||||
|
||||
lms_CXXFLAGS=-DBOOST_LOG_DYN_LINK -std=c++11 -Wall -I$(top_srcdir)/third-party -I$(srcdir)/ui -I$(srcdir)/remote
|
||||
|
||||
|
||||
@@ -97,7 +97,13 @@ int main(int argc, char* argv[])
|
||||
serviceManager.startService( std::make_shared<Service::DatabaseUpdateService>( dbUpdateConfig ) );
|
||||
|
||||
if (remoteConfig.enable)
|
||||
{
|
||||
#if defined HAVE_LMSAPI
|
||||
serviceManager.startService( std::make_shared<Service::RemoteServerService>( remoteConfig ));
|
||||
#else
|
||||
LMS_LOG(MOD_MAIN, SEV_ERROR) << "LMS API cannot be activated since it is not compiled";
|
||||
#endif
|
||||
}
|
||||
|
||||
if (uiConfig.enable)
|
||||
serviceManager.startService( std::make_shared<Service::UserInterfaceService>(boost::filesystem::path(argv[0]), uiConfig));
|
||||
|
||||
Reference in New Issue
Block a user