hyperion.ng/src/hyperiond/CMakeLists.txt
redPanther b293ea20db build script optimization (#642)
* implement make install
set CMAKE_INSTALL_PREFIX e.g. to /opt to install to /opt/hyperion
set ENABLE_SYSTEM_INSTALL to ON to activate installation
after compiling use
make install
or
make install/strip
(for performance/size optimized binaries - compile in Release to get best performance)

* cleanup cmake files
use
cmake -DINSTALL_PREFIX=/opt/hyperion ..
to install all files to hyperion or
cmake -DINSTALL_PREFIX=/usr/
to install to usr. install folders are linux standard. bin go to bin folder and additionals (effects) go to share/hyperion

* add uninstall target - be patient with that, this will remove files from your system
install service files to share/hyperion - if you want to use them you have to make a symlink to your location of service files

* optimize build release script
install service files into hyperion share folder (services not activated, this must be done by distribution package script)
initial support of cmake option -DPLATFORM= option. This selects platform specific cmake flags. no need for -DENABLE_... options (unless you want some special things)
automatic detect for apple build

* update submodule


Former-commit-id: 5f06f314841810c780c871f810158010d3d2de70
2016-05-22 00:27:06 +02:00

46 lines
1.1 KiB
CMake

add_executable(hyperiond
hyperiond.cpp)
target_link_libraries(hyperiond
hyperion
xbmcvideochecker
effectengine
jsonserver
boblightserver
)
if (ENABLE_DISPMANX)
target_link_libraries(hyperiond dispmanx-grabber)
endif ()
if (ENABLE_FB)
target_link_libraries(hyperiond framebuffer-grabber)
endif ()
if (ENABLE_OSX)
target_link_libraries(hyperiond osx-grabber)
endif ()
if (ENABLE_V4L2)
target_link_libraries(hyperiond v4l2-grabber)
endif ()
if (ENABLE_AMLOGIC)
target_link_libraries(hyperiond amlogic-grabber)
endif ()
if (ENABLE_PROTOBUF)
target_link_libraries(hyperiond protoserver)
endif ()
install ( TARGETS hyperiond DESTINATION "${DEPLOY_DIR}/bin" )
install ( DIRECTORY ${CMAKE_SOURCE_DIR}/effects DESTINATION "${DEPLOY_DIR}/share/hyperion/" )
install ( DIRECTORY ${CMAKE_SOURCE_DIR}/bin/service DESTINATION "${DEPLOY_DIR}/share/hyperion/" )
if (ENABLE_SYSTEM_INSTALL)
install ( TARGETS hyperiond DESTINATION "bin" )
install ( DIRECTORY ${CMAKE_SOURCE_DIR}/effects DESTINATION "share/hyperion/" )
install ( DIRECTORY ${CMAKE_SOURCE_DIR}/bin/service DESTINATION "share/hyperion/" )
endif()