2020-05-12 19:51:19 +02:00
|
|
|
if (NOT CMAKE_VERSION VERSION_LESS "3.12")
|
|
|
|
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
|
|
|
|
include_directories(${Python3_INCLUDE_DIRS} ${Python3_INCLUDE_DIRS}/..)
|
|
|
|
else()
|
|
|
|
find_package (PythonLibs ${PYTHON_VERSION_STRING} EXACT) # Maps PythonLibs to the PythonInterp version of the main cmake
|
|
|
|
include_directories(${PYTHON_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS}/..)
|
|
|
|
endif()
|
2020-02-16 16:24:33 +01:00
|
|
|
|
2020-05-12 19:51:19 +02:00
|
|
|
find_package(Qt5Widgets REQUIRED)
|
2020-02-16 16:24:33 +01:00
|
|
|
|
2017-08-01 15:42:36 +02:00
|
|
|
add_executable(hyperiond
|
2020-07-12 09:18:40 +02:00
|
|
|
console.h
|
2017-01-22 14:31:11 +01:00
|
|
|
hyperiond.h
|
2017-08-01 17:29:47 +02:00
|
|
|
systray.h
|
2016-12-23 19:37:35 +01:00
|
|
|
hyperiond.cpp
|
2017-08-01 17:29:47 +02:00
|
|
|
systray.cpp
|
2016-12-23 19:37:35 +01:00
|
|
|
main.cpp
|
2020-05-12 19:51:19 +02:00
|
|
|
${WIN_RC_ICON_FILE}
|
2016-12-23 19:37:35 +01:00
|
|
|
)
|
2014-09-08 16:16:02 +02:00
|
|
|
|
|
|
|
target_link_libraries(hyperiond
|
2020-07-20 20:06:41 +02:00
|
|
|
commandline
|
|
|
|
hyperion
|
|
|
|
effectengine
|
|
|
|
jsonserver
|
|
|
|
flatbufserver
|
|
|
|
protoserver
|
|
|
|
webserver
|
|
|
|
ssdp
|
|
|
|
database
|
|
|
|
python
|
|
|
|
resources
|
|
|
|
Qt5::Widgets
|
2014-09-08 16:16:02 +02:00
|
|
|
)
|
|
|
|
|
2020-05-12 19:51:19 +02:00
|
|
|
if (NOT CMAKE_VERSION VERSION_LESS "3.12")
|
|
|
|
target_link_libraries( hyperiond ${Python3_LIBRARIES} )
|
|
|
|
else()
|
|
|
|
target_link_libraries( hyperiond ${PYTHON_LIBRARIES} )
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (ENABLE_AVAHI)
|
|
|
|
target_link_libraries(hyperiond bonjour)
|
|
|
|
endif ()
|
|
|
|
|
2019-02-12 14:55:36 +01:00
|
|
|
if (ENABLE_AMLOGIC)
|
|
|
|
target_link_libraries(hyperiond
|
|
|
|
Qt5::Core
|
|
|
|
pcre16 dl z
|
|
|
|
)
|
|
|
|
endif()
|
|
|
|
|
2014-09-08 16:16:02 +02:00
|
|
|
if (ENABLE_DISPMANX)
|
2017-09-02 22:26:22 +02:00
|
|
|
IF ( "${PLATFORM}" MATCHES rpi)
|
|
|
|
find_package(BCM REQUIRED)
|
|
|
|
include_directories(${BCM_INCLUDE_DIRS})
|
|
|
|
ELSE()
|
|
|
|
SET(BCM_INCLUDE_DIRS "")
|
|
|
|
SET(BCM_LIBRARIES "")
|
|
|
|
ENDIF()
|
2014-09-08 16:16:02 +02:00
|
|
|
target_link_libraries(hyperiond dispmanx-grabber)
|
2016-05-22 00:27:06 +02:00
|
|
|
endif ()
|
2014-09-08 16:16:02 +02:00
|
|
|
|
2015-01-18 00:04:45 +01:00
|
|
|
if (ENABLE_FB)
|
|
|
|
target_link_libraries(hyperiond framebuffer-grabber)
|
2016-05-22 00:27:06 +02:00
|
|
|
endif ()
|
2015-01-18 00:04:45 +01:00
|
|
|
|
2015-01-24 23:42:22 +01:00
|
|
|
if (ENABLE_OSX)
|
|
|
|
target_link_libraries(hyperiond osx-grabber)
|
2016-05-22 00:27:06 +02:00
|
|
|
endif ()
|
2015-01-24 23:42:22 +01:00
|
|
|
|
2014-09-08 16:16:02 +02:00
|
|
|
if (ENABLE_V4L2)
|
|
|
|
target_link_libraries(hyperiond v4l2-grabber)
|
2016-05-22 00:27:06 +02:00
|
|
|
endif ()
|
2014-09-08 16:16:02 +02:00
|
|
|
|
2015-08-20 09:51:44 +02:00
|
|
|
if (ENABLE_AMLOGIC)
|
|
|
|
target_link_libraries(hyperiond amlogic-grabber)
|
2016-05-22 00:27:06 +02:00
|
|
|
endif ()
|
2015-08-20 09:51:44 +02:00
|
|
|
|
2016-07-24 15:18:34 +02:00
|
|
|
if (ENABLE_X11)
|
2020-05-25 21:46:25 +02:00
|
|
|
if(APPLE)
|
|
|
|
include_directories("/opt/X11/include")
|
|
|
|
endif(APPLE)
|
2019-01-19 18:35:40 +01:00
|
|
|
target_link_libraries(hyperiond x11-grabber)
|
2016-07-24 15:18:34 +02:00
|
|
|
endif ()
|
|
|
|
|
2019-01-06 19:49:56 +01:00
|
|
|
if (ENABLE_QT)
|
2019-01-19 18:35:40 +01:00
|
|
|
target_link_libraries(hyperiond qt-grabber)
|
2019-01-06 19:49:56 +01:00
|
|
|
endif ()
|
2017-08-01 17:29:47 +02:00
|
|
|
|
2020-07-20 20:06:41 +02:00
|
|
|
if (ENABLE_CEC)
|
|
|
|
target_link_libraries(hyperiond cechandler)
|
|
|
|
endif ()
|
|
|
|
|
2020-05-12 19:51:19 +02:00
|
|
|
if(NOT WIN32)
|
|
|
|
install ( TARGETS hyperiond DESTINATION "share/hyperion/bin" COMPONENT "Hyperion" )
|
|
|
|
install ( DIRECTORY ${CMAKE_SOURCE_DIR}/bin/service DESTINATION "share/hyperion/" COMPONENT "Hyperion" )
|
|
|
|
install ( FILES ${CMAKE_SOURCE_DIR}/effects/readme.txt DESTINATION "share/hyperion/effects" COMPONENT "Hyperion" )
|
|
|
|
install ( FILES ${CMAKE_SOURCE_DIR}/resources/icons/hyperion-icon-32px.png DESTINATION "share/hyperion/icons" COMPONENT "Hyperion" )
|
|
|
|
|
|
|
|
# Desktop file for hyperiond
|
|
|
|
install ( FILES ${CMAKE_SOURCE_DIR}/cmake/desktop/hyperiond_128.png DESTINATION "share/hyperion/desktop" COMPONENT "Hyperion" )
|
|
|
|
install ( FILES ${CMAKE_SOURCE_DIR}/cmake/desktop/hyperiond.desktop DESTINATION "share/hyperion/desktop" COMPONENT "Hyperion" )
|
|
|
|
else()
|
|
|
|
install ( TARGETS hyperiond DESTINATION "bin" COMPONENT "Hyperion" )
|
|
|
|
install ( FILES ${CMAKE_SOURCE_DIR}/effects/readme.txt DESTINATION "effects" COMPONENT "Hyperion" )
|
|
|
|
|
|
|
|
#set( CMAKE_INSTALL_UCRT_LIBRARIES TRUE )
|
|
|
|
#set( CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP TRUE )
|
|
|
|
#include( InstallRequiredSystemLibraries )
|
|
|
|
endif()
|
2019-01-19 18:35:40 +01:00
|
|
|
|
2016-11-20 22:57:19 +01:00
|
|
|
if(CMAKE_HOST_UNIX)
|
2020-05-12 19:51:19 +02:00
|
|
|
install( CODE "EXECUTE_PROCESS(COMMAND ln -sf \"../share/hyperion/bin/hyperiond\" \"${CMAKE_BINARY_DIR}/symlink_hyperiond\" )" COMPONENT "Hyperion" )
|
|
|
|
install( FILES ${CMAKE_BINARY_DIR}/symlink_hyperiond DESTINATION "bin" RENAME hyperiond COMPONENT "Hyperion" )
|
|
|
|
install( CODE "FILE (REMOVE ${CMAKE_BINARY_DIR}/symlink_hyperiond )" COMPONENT "Hyperion" )
|
|
|
|
endif()
|
2020-02-24 18:02:34 +01:00
|
|
|
|
|
|
|
# Copy dependencies (not for OSX)
|
2020-05-12 19:51:19 +02:00
|
|
|
include(${CMAKE_SOURCE_DIR}/cmake/Dependencies.cmake)
|
|
|
|
|
|
|
|
if (NOT ENABLE_OSX AND NOT WIN32) # Unix
|
|
|
|
DeployUnix("hyperiond")
|
|
|
|
elseif(WIN32) # Windows
|
|
|
|
DeployWindows("hyperiond")
|
2020-02-24 18:02:34 +01:00
|
|
|
endif ()
|