hyperion.ng/src/hyperion-remote/CMakeLists.txt

37 lines
1.0 KiB
CMake
Raw Normal View History

cmake_minimum_required(VERSION 2.8)
project(hyperion-remote)
find_package(Qt5 COMPONENTS Core Gui Widgets Network REQUIRED)
# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${Qt5Widgets_EXECUTABLE_COMPILE_FLAGS}")
# set(CMAKE_CXX_FLAGS "-fPIC")
# The following I do not undrstand completely...
# libQtCore.so uses some hardcoded library path inside which are incorrect after copying the file RPi file system
# Therefor, an extra path is needed on which to find the required libraries
LINK_DIRECTORIES(${LINK_DIRECTORIES} ${CMAKE_FIND_ROOT_PATH}/lib/arm-linux-gnueabihf)
include_directories(${QT_INCLUDES})
set(hyperion-remote_HEADERS
CustomParameter.h
JsonConnection.h
ColorTransformValues.h)
set(hyperion-remote_SOURCES
hyperion-remote.cpp
JsonConnection.cpp)
add_executable(${PROJECT_NAME}
${hyperion-remote_HEADERS}
${hyperion-remote_SOURCES})
target_link_libraries(${PROJECT_NAME}
jsoncpp
getoptPlusPlus
${QT_LIBRARIES})
qt5_use_modules(${PROJECT_NAME} Gui Core Network)
create debian packages / multiple configs (#650) * 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 * fix cmake error when no platform is given * initial support for deb,rpm and tgz packages - no usefull content atm! * make packeages contain usefull stuff * add license make packes more functional. package specific install missing yet * implement debian postinstall * disable rpm generation until it has a working state * add hypercon compat * add posibility for multiple config files. first one found is taken Former-commit-id: 1c2669961da98fd05a97359e75f1d6d68e126715
2016-05-24 19:56:43 +02:00
install ( TARGETS ${PROJECT_NAME} DESTINATION "bin" COMPONENT ambilight )