cmake 3.0.0 (#480)

This commit is contained in:
brindosch 2017-10-13 00:06:31 +02:00 committed by GitHub
parent 9cc6c75633
commit 992dd6ea84
14 changed files with 23 additions and 32 deletions

View File

@ -1,9 +1,11 @@
cmake_minimum_required(VERSION 2.8.12) cmake_minimum_required(VERSION 3.0.0)
PROJECT(hyperion) PROJECT(hyperion)
# Instruct CMake to run moc automatically when needed. # Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON) set(CMAKE_AUTOMOC ON)
# auto prepare .qrc files
set(CMAKE_AUTORCC ON)
IF ( POLICY CMP0026 ) IF ( POLICY CMP0026 )
CMAKE_POLICY( SET CMP0026 OLD ) CMAKE_POLICY( SET CMP0026 OLD )

View File

@ -6,6 +6,13 @@
sudo apt-get update sudo apt-get update
sudo apt-get install git cmake build-essential qtbase5-dev libqt5serialport5-dev libusb-1.0-0-dev python-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev sudo apt-get install git cmake build-essential qtbase5-dev libqt5serialport5-dev libusb-1.0-0-dev python-dev libxrender-dev libavahi-core-dev libavahi-compat-libdnssd-dev
``` ```
### Ubuntu 14.04 specific
You need a never version of cmake (minimum 3.0.0). Install it from the ppa or website
```
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:george-edison55/cmake-3.x
sudo apt-get update && sudo apt-get upgrade
```
**on RPI you need the videocore IV headers** **on RPI you need the videocore IV headers**

View File

@ -21,10 +21,8 @@ CONFIGURE_FILE(${CURRENT_SOURCE_DIR}/EffectEngine.qrc.in ${CMAKE_BINARY_DIR}/Eff
SET(EffectEngine_RESOURCES ${CMAKE_BINARY_DIR}/EffectEngine.qrc) SET(EffectEngine_RESOURCES ${CMAKE_BINARY_DIR}/EffectEngine.qrc)
qt5_add_resources(EffectEngine_RESOURCES_RCC ${EffectEngine_RESOURCES} ) # OPTIONS "-no-compress"
add_library(effectengine add_library(effectengine
${EffectEngine_RESOURCES_RCC} ${EffectEngine_RESOURCES}
${EffectEngineSOURCES} ${EffectEngineSOURCES}
) )

View File

@ -5,11 +5,11 @@ SET(CURRENT_SOURCE_DIR ${CMAKE_SOURCE_DIR}/libsrc/hyperion)
FILE ( GLOB Hyperion_SOURCES "${CURRENT_HEADER_DIR}/*.h" "${CURRENT_SOURCE_DIR}/*.h" "${CURRENT_SOURCE_DIR}/*.cpp" ) FILE ( GLOB Hyperion_SOURCES "${CURRENT_HEADER_DIR}/*.h" "${CURRENT_SOURCE_DIR}/*.h" "${CURRENT_SOURCE_DIR}/*.cpp" )
QT5_ADD_RESOURCES(Hyperion_RESOURCES_RCC ${CURRENT_SOURCE_DIR}/resource.qrc OPTIONS "-no-compress") SET(Hyperion_RESOURCES ${CURRENT_SOURCE_DIR}/resource.qrc)
add_library(hyperion add_library(hyperion
${Hyperion_SOURCES} ${Hyperion_SOURCES}
${Hyperion_RESOURCES_RCC} ${Hyperion_RESOURCES}
) )
target_link_libraries(hyperion target_link_libraries(hyperion

View File

@ -15,7 +15,7 @@ include_directories(
dev_tinker dev_tinker
) )
FILE ( GLOB Leddevice_SOURCES FILE ( GLOB Leddevice_SOURCES
"${CURRENT_HEADER_DIR}/*.h" "${CURRENT_HEADER_DIR}/*.h"
"${CURRENT_SOURCE_DIR}/*.h" "${CURRENT_SOURCE_DIR}/*.h"
"${CURRENT_SOURCE_DIR}/*.cpp" "${CURRENT_SOURCE_DIR}/*.cpp"
@ -51,12 +51,9 @@ endif()
set(LedDevice_RESOURCES ${CURRENT_SOURCE_DIR}/LedDeviceSchemas.qrc ) set(LedDevice_RESOURCES ${CURRENT_SOURCE_DIR}/LedDeviceSchemas.qrc )
qt5_add_resources(LedDevice_RESOURCES_RCC ${LedDevice_RESOURCES} OPTIONS "-no-compress") SET( Leddevice_SOURCES
SET( Leddevice_SOURCES
${Leddevice_SOURCES} ${Leddevice_SOURCES}
${LedDevice_RESOURCES} ${LedDevice_RESOURCES}
${LedDevice_RESOURCES_RCC}
${Leddevice_USB_HID_SOURCES} ${Leddevice_USB_HID_SOURCES}
${Leddevice_TINKER_SOURCES} ${Leddevice_TINKER_SOURCES}
${Leddevice_SPI_SOURCES} ${Leddevice_SPI_SOURCES}
@ -101,4 +98,3 @@ if (ENABLE_USB_HID)
target_link_libraries(leddevice ${LIBUSB_1_LIBRARIES} hidapi-libusb) target_link_libraries(leddevice ${LIBUSB_1_LIBRARIES} hidapi-libusb)
endif() endif()
endif() endif()

View File

@ -11,13 +11,9 @@ endif()
set(Utils_RESOURCES ${CURRENT_SOURCE_DIR}/JSONRPC_schemas.qrc ) set(Utils_RESOURCES ${CURRENT_SOURCE_DIR}/JSONRPC_schemas.qrc )
qt5_add_resources(Utils_RESOURCES_RCC ${Utils_RESOURCES} OPTIONS "-no-compress")
add_library(hyperion-utils add_library(hyperion-utils
${Utils_SOURCES} ${Utils_SOURCES}
${Utils_RESOURCES} ${Utils_RESOURCES}
${Utils_RESOURCES_RCC}
) )
target_link_libraries(hyperion-utils target_link_libraries(hyperion-utils

View File

@ -13,11 +13,9 @@ ENDFOREACH()
CONFIGURE_FILE(${CURRENT_SOURCE_DIR}/WebConfig.qrc.in ${CMAKE_BINARY_DIR}/WebConfig.qrc ) CONFIGURE_FILE(${CURRENT_SOURCE_DIR}/WebConfig.qrc.in ${CMAKE_BINARY_DIR}/WebConfig.qrc )
SET(WebConfig_RESOURCES ${CMAKE_BINARY_DIR}/WebConfig.qrc) SET(WebConfig_RESOURCES ${CMAKE_BINARY_DIR}/WebConfig.qrc)
qt5_add_resources(WebConfig_RESOURCES_RCC ${WebConfig_RESOURCES} ) #OPTIONS "-no-compress"
add_library(webconfig add_library(webconfig
${WebConfig_SOURCES} ${WebConfig_SOURCES}
${WebConfig_RESOURCES_RCC} ${WebConfig_RESOURCES}
) )
target_link_libraries(webconfig target_link_libraries(webconfig

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12) cmake_minimum_required(VERSION 3.0.0)
project(hyperion-aml) project(hyperion-aml)
find_package(Qt5Widgets REQUIRED) find_package(Qt5Widgets REQUIRED)
@ -30,7 +30,6 @@ target_link_libraries(${PROJECT_NAME}
protoserver protoserver
amlogic-grabber amlogic-grabber
framebuffer-grabber framebuffer-grabber
pthread
Qt5::Core Qt5::Core
Qt5::Gui Qt5::Gui
Qt5::Network Qt5::Network

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12) cmake_minimum_required(VERSION 3.0.0)
project(hyperion-dispmanx) project(hyperion-dispmanx)
find_package(Qt5Widgets REQUIRED) find_package(Qt5Widgets REQUIRED)
@ -37,7 +37,6 @@ target_link_libraries( ${PROJECT_NAME}
protoserver protoserver
dispmanx-grabber dispmanx-grabber
${Dispmanx_LIBRARIES} ${Dispmanx_LIBRARIES}
pthread
Qt5::Core Qt5::Core
Qt5::Gui Qt5::Gui
Qt5::Network Qt5::Network

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12) cmake_minimum_required(VERSION 3.0.0)
project(hyperion-framebuffer) project(hyperion-framebuffer)
find_package(Qt5Widgets REQUIRED) find_package(Qt5Widgets REQUIRED)
@ -29,7 +29,6 @@ target_link_libraries( ${PROJECT_NAME}
hyperion-utils hyperion-utils
protoserver protoserver
framebuffer-grabber framebuffer-grabber
pthread
Qt5::Core Qt5::Core
Qt5::Gui Qt5::Gui
Qt5::Network Qt5::Network

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12) cmake_minimum_required(VERSION 3.0.0)
project(hyperion-osx) project(hyperion-osx)
find_package(Qt5Widgets REQUIRED) find_package(Qt5Widgets REQUIRED)
@ -29,7 +29,6 @@ target_link_libraries( ${PROJECT_NAME}
hyperion-utils hyperion-utils
protoserver protoserver
osx-grabber osx-grabber
pthread
Qt5::Core Qt5::Core
Qt5::Gui Qt5::Gui
Qt5::Network Qt5::Network

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12) cmake_minimum_required(VERSION 3.0.0)
project(hyperion-remote) project(hyperion-remote)
find_package(Qt5 COMPONENTS Core Gui Widgets Network REQUIRED) find_package(Qt5 COMPONENTS Core Gui Widgets Network REQUIRED)

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12) cmake_minimum_required(VERSION 3.0.0)
project(hyperion-v4l2) project(hyperion-v4l2)
find_package(Qt5Widgets REQUIRED) find_package(Qt5Widgets REQUIRED)
@ -29,7 +29,6 @@ target_link_libraries(${PROJECT_NAME}
blackborder blackborder
hyperion-utils hyperion-utils
protoserver protoserver
pthread
Qt5::Core Qt5::Core
Qt5::Gui Qt5::Gui
Qt5::Network Qt5::Network

View File

@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 2.8.12) cmake_minimum_required(VERSION 3.0.0)
project(hyperion-x11) project(hyperion-x11)
find_package(Qt5Widgets REQUIRED) find_package(Qt5Widgets REQUIRED)
@ -33,7 +33,6 @@ target_link_libraries(${PROJECT_NAME}
x11-grabber x11-grabber
${X11_LIBRARIES} ${X11_LIBRARIES}
${X11_Xrender_LIB} ${X11_Xrender_LIB}
pthread
Qt5::Core Qt5::Core
Qt5::Gui Qt5::Gui
Qt5::Network Qt5::Network