mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Allow disabling PROTOBUF support
One dependency less for users that only use DISPMANX grabbing Former-commit-id: 24ea0480e3798bab692e75d82ddb9f5eccfa03c5
This commit is contained in:
@@ -1,20 +1,23 @@
|
||||
|
||||
add_executable(hyperiond
|
||||
hyperiond.cpp)
|
||||
|
||||
target_link_libraries(hyperiond
|
||||
hyperion
|
||||
xbmcvideochecker
|
||||
effectengine
|
||||
jsonserver
|
||||
protoserver
|
||||
boblightserver
|
||||
)
|
||||
|
||||
if (ENABLE_DISPMANX)
|
||||
target_link_libraries(hyperiond dispmanx-grabber)
|
||||
endif (ENABLE_DISPMANX)
|
||||
|
||||
if (ENABLE_V4L2)
|
||||
target_link_libraries(hyperiond v4l2-grabber)
|
||||
endif (ENABLE_V4L2)
|
||||
|
||||
add_executable(hyperiond
|
||||
hyperiond.cpp)
|
||||
|
||||
target_link_libraries(hyperiond
|
||||
hyperion
|
||||
xbmcvideochecker
|
||||
effectengine
|
||||
jsonserver
|
||||
boblightserver
|
||||
)
|
||||
|
||||
if (ENABLE_DISPMANX)
|
||||
target_link_libraries(hyperiond dispmanx-grabber)
|
||||
endif (ENABLE_DISPMANX)
|
||||
|
||||
if (ENABLE_V4L2)
|
||||
target_link_libraries(hyperiond v4l2-grabber)
|
||||
endif (ENABLE_V4L2)
|
||||
|
||||
if (ENABLE_PROTOBUF)
|
||||
target_link_libraries(hyperiond protoserver)
|
||||
endif (ENABLE_PROTOBUF)
|
||||
|
@@ -36,8 +36,10 @@
|
||||
// JsonServer includes
|
||||
#include <jsonserver/JsonServer.h>
|
||||
|
||||
#ifdef ENABLE_PROTOBUF
|
||||
// ProtoServer includes
|
||||
#include <protoserver/ProtoServer.h>
|
||||
#endif
|
||||
|
||||
// BoblightServer includes
|
||||
#include <boblightserver/BoblightServer.h>
|
||||
@@ -233,6 +235,7 @@ int main(int argc, char** argv)
|
||||
std::cout << "Json server created and started on port " << jsonServer->getPort() << std::endl;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_PROTOBUF
|
||||
// Create Proto server if configuration is present
|
||||
ProtoServer * protoServer = nullptr;
|
||||
if (config.isMember("protoServer"))
|
||||
@@ -241,6 +244,7 @@ int main(int argc, char** argv)
|
||||
protoServer = new ProtoServer(&hyperion, protoServerConfig["port"].asUInt());
|
||||
std::cout << "Proto server created and started on port " << protoServer->getPort() << std::endl;
|
||||
}
|
||||
#endif
|
||||
|
||||
// Create Boblight server if configuration is present
|
||||
BoblightServer * boblightServer = nullptr;
|
||||
@@ -264,7 +268,9 @@ int main(int argc, char** argv)
|
||||
#endif
|
||||
delete xbmcVideoChecker;
|
||||
delete jsonServer;
|
||||
#ifdef ENABLE_PROTOBUF
|
||||
delete protoServer;
|
||||
#endif
|
||||
delete boblightServer;
|
||||
|
||||
// leave application
|
||||
|
Reference in New Issue
Block a user