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
This commit is contained in:
redPanther
2016-05-22 00:27:06 +02:00
committed by brindosch
parent 19a6bf1ee7
commit b293ea20db
13 changed files with 186 additions and 114 deletions

View File

@@ -12,26 +12,34 @@ target_link_libraries(hyperiond
if (ENABLE_DISPMANX)
target_link_libraries(hyperiond dispmanx-grabber)
endif (ENABLE_DISPMANX)
endif ()
if (ENABLE_FB)
target_link_libraries(hyperiond framebuffer-grabber)
endif (ENABLE_FB)
endif ()
if (ENABLE_OSX)
target_link_libraries(hyperiond osx-grabber)
endif (ENABLE_OSX)
endif ()
if (ENABLE_V4L2)
target_link_libraries(hyperiond v4l2-grabber)
endif (ENABLE_V4L2)
endif ()
if (ENABLE_AMLOGIC)
target_link_libraries(hyperiond amlogic-grabber)
endif (ENABLE_AMLOGIC)
endif ()
if (ENABLE_PROTOBUF)
target_link_libraries(hyperiond protoserver)
endif (ENABLE_PROTOBUF)
endif ()
install ( TARGETS hyperiond DESTINATION "${CMAKE_SOURCE_DIR}/deploy/bin" )
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()