Merge pull request #3 from hyperion-project/master

.
This commit is contained in:
b1rdhous3 2019-02-13 23:01:40 +01:00 committed by GitHub
commit 1f6e12ae92
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 65 additions and 11 deletions

View File

@ -12,7 +12,11 @@ endif()
set(USE_SYSTEM_FLATBUFFERS_LIBS ${DEFAULT_USE_SYSTEM_FLATBUFFERS_LIBS} CACHE BOOL "use flatbuffers library from system") set(USE_SYSTEM_FLATBUFFERS_LIBS ${DEFAULT_USE_SYSTEM_FLATBUFFERS_LIBS} CACHE BOOL "use flatbuffers library from system")
if (USE_SYSTEM_FLATBUFFERS_LIBS) if (USE_SYSTEM_FLATBUFFERS_LIBS)
if (ENABLE_AMLOGIC)
find_program(FLATBUFFERS_FLATC_EXECUTABLE NAMES flatc REQUIRED)
else ()
find_package(flatbuffers REQUIRED) find_package(flatbuffers REQUIRED)
endif()
include_directories(${FLATBUFFERS_INCLUDE_DIRS}) include_directories(${FLATBUFFERS_INCLUDE_DIRS})
else () else ()
set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared flatbuffers library") set(BUILD_SHARED_LIBS OFF CACHE BOOL "Build shared flatbuffers library")
@ -42,6 +46,14 @@ message(STATUS "Using flatbuffers compiler: " ${FLATBUFFERS_FLATC_EXECUTABLE})
function(compile_flattbuffer_schema SRC_FBS OUTPUT_DIR) function(compile_flattbuffer_schema SRC_FBS OUTPUT_DIR)
string(REGEX REPLACE "\\.fbs$" "_generated.h" GEN_HEADER ${SRC_FBS}) string(REGEX REPLACE "\\.fbs$" "_generated.h" GEN_HEADER ${SRC_FBS})
if (ENABLE_AMLOGIC)
add_custom_command(
OUTPUT ${GEN_HEADER}
COMMAND "${FLATBUFFERS_FLATC_EXECUTABLE}" -c --no-includes --gen-mutable
--gen-object-api
-o "${OUTPUT_DIR}"
"${SRC_FBS}")
else()
add_custom_command( add_custom_command(
OUTPUT ${GEN_HEADER} OUTPUT ${GEN_HEADER}
COMMAND "${FLATBUFFERS_FLATC_EXECUTABLE}" -c --no-includes --gen-mutable COMMAND "${FLATBUFFERS_FLATC_EXECUTABLE}" -c --no-includes --gen-mutable
@ -49,4 +61,5 @@ function(compile_flattbuffer_schema SRC_FBS OUTPUT_DIR)
-o "${OUTPUT_DIR}" -o "${OUTPUT_DIR}"
"${SRC_FBS}" "${SRC_FBS}"
DEPENDS flatc) DEPENDS flatc)
endif()
endfunction() endfunction()

View File

@ -30,7 +30,11 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#define BONJOURSERVICEBROWSER_H #define BONJOURSERVICEBROWSER_H
#include <QtCore/QObject> #include <QtCore/QObject>
#ifndef PLATFORM_AMLOGIC
#include <dns_sd.h> #include <dns_sd.h>
#else
#include <avahi-compat-libdns_sd/dns_sd.h>
#endif
#include "bonjour/bonjourrecord.h" #include "bonjour/bonjourrecord.h"

View File

@ -34,7 +34,11 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include "bonjourrecord.h" #include "bonjourrecord.h"
class QSocketNotifier; class QSocketNotifier;
#ifndef PLATFORM_AMLOGIC
#include <dns_sd.h> #include <dns_sd.h>
#else
#include <avahi-compat-libdns_sd/dns_sd.h>
#endif
class BonjourServiceRegister : public QObject class BonjourServiceRegister : public QObject
{ {

View File

@ -31,9 +31,11 @@ ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <QtCore/QObject> #include <QtCore/QObject>
#ifndef PLATFORM_AMLOGIC
#include <dns_sd.h> #include <dns_sd.h>
#else
#include <avahi-compat-libdns_sd/dns_sd.h>
#endif
class QSocketNotifier; class QSocketNotifier;
class QHostInfo; class QHostInfo;
class BonjourRecord; class BonjourRecord;

View File

@ -35,6 +35,12 @@ target_link_libraries(${PROJECT_NAME}
Qt5::Network Qt5::Network
) )
if (ENABLE_AMLOGIC)
target_link_libraries(${PROJECT_NAME}
pcre16 dl z
)
endif()
install ( TARGETS ${PROJECT_NAME} DESTINATION "share/hyperion/bin/" COMPONENT "${PLATFORM}" ) install ( TARGETS ${PROJECT_NAME} DESTINATION "share/hyperion/bin/" COMPONENT "${PLATFORM}" )
if(CMAKE_HOST_UNIX) if(CMAKE_HOST_UNIX)

View File

@ -34,6 +34,12 @@ target_link_libraries( ${PROJECT_NAME}
Qt5::Network Qt5::Network
) )
if (ENABLE_AMLOGIC)
target_link_libraries( ${PROJECT_NAME}
pcre16 dl z
)
endif()
install ( TARGETS ${PROJECT_NAME} DESTINATION "share/hyperion/bin/" COMPONENT "${PLATFORM}" ) install ( TARGETS ${PROJECT_NAME} DESTINATION "share/hyperion/bin/" COMPONENT "${PLATFORM}" )
if(CMAKE_HOST_UNIX) if(CMAKE_HOST_UNIX)

View File

@ -29,6 +29,12 @@ target_link_libraries(${PROJECT_NAME}
Qt5::Core Qt5::Core
Qt5::Network) Qt5::Network)
if (ENABLE_AMLOGIC)
target_link_libraries(${PROJECT_NAME}
pcre16 dl z
)
endif()
install ( TARGETS ${PROJECT_NAME} DESTINATION "share/hyperion/bin/" COMPONENT "${PLATFORM}" ) install ( TARGETS ${PROJECT_NAME} DESTINATION "share/hyperion/bin/" COMPONENT "${PLATFORM}" )
if(CMAKE_HOST_UNIX) if(CMAKE_HOST_UNIX)

View File

@ -34,6 +34,12 @@ target_link_libraries(${PROJECT_NAME}
Qt5::Network Qt5::Network
) )
if (ENABLE_AMLOGIC)
target_link_libraries(${PROJECT_NAME}
pcre16 dl z
)
endif()
install ( TARGETS ${PROJECT_NAME} DESTINATION "share/hyperion/bin/" COMPONENT "${PLATFORM}" ) install ( TARGETS ${PROJECT_NAME} DESTINATION "share/hyperion/bin/" COMPONENT "${PLATFORM}" )
if(CMAKE_HOST_UNIX) if(CMAKE_HOST_UNIX)

View File

@ -24,6 +24,13 @@ target_link_libraries(hyperiond
${PYTHON_LIBRARIES} ${PYTHON_LIBRARIES}
) )
if (ENABLE_AMLOGIC)
target_link_libraries(hyperiond
Qt5::Core
pcre16 dl z
)
endif()
if (ENABLE_DISPMANX) if (ENABLE_DISPMANX)
IF ( "${PLATFORM}" MATCHES rpi) IF ( "${PLATFORM}" MATCHES rpi)
find_package(BCM REQUIRED) find_package(BCM REQUIRED)