diff --git a/.ci/ci_build.sh b/.ci/ci_build.sh index f621bf4ba..2b7974fbd 100755 --- a/.ci/ci_build.sh +++ b/.ci/ci_build.sh @@ -108,6 +108,7 @@ elif [[ "$CI_NAME" == 'linux' ]]; then make -j $(nproc) package || exit 3 && cp /hyperhdr/build/bin/h* /deploy/ 2>/dev/null || : && cp /hyperhdr/build/Hyper* /deploy/ 2>/dev/null || : && + ccache -s && exit 0; exit 1 " || { echo "---> HyperHDR compilation failed! Abort"; exit 5; } ls -a .ccache diff --git a/CMakeLists.txt b/CMakeLists.txt index 596237bdf..cf479e6c1 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -17,13 +17,36 @@ set(CMAKE_AUTORCC ON) set_property(GLOBAL PROPERTY USE_FOLDERS ON) +# Set build variables +SET ( DEFAULT_PROTOBUF ON ) +SET ( DEFAULT_BOBLIGHT ON ) +SET ( DEFAULT_WS281XPWM OFF ) +SET ( DEFAULT_USE_SYSTEM_FLATBUFFERS_LIBS OFF ) +SET ( DEFAULT_USE_SYSTEM_MBEDTLS_LIBS OFF ) +SET ( DEFAULT_MF OFF ) +SET ( DEFAULT_DX OFF ) +SET ( DEFAULT_AVF OFF ) +SET ( DEFAULT_MAC_SYSTEM OFF ) +SET ( DEFAULT_V4L2 OFF ) +SET ( DEFAULT_X11 OFF ) +SET ( DEFAULT_PIPEWIRE OFF ) +SET ( DEFAULT_FRAMEBUFFER OFF ) +SET ( DEFAULT_SOUNDCAPWINDOWS OFF ) +SET ( DEFAULT_SOUNDCAPMACOS OFF ) +SET ( DEFAULT_CEC OFF ) +SET ( DEFAULT_BONJOUR ON ) +SET ( DEFAULT_MQTT ON ) +SET ( DEFAULT_STATIC_QT_PLUGINS OFF ) +SET ( DEFAULT_PRECOMPILED_HEADERS ON ) + # Configure CCache if available find_program(CCACHE_FOUND ccache) if ( CCACHE_FOUND ) if (DEFINED ENV{CCACHE_DIR}) - message ( STATUS "Found CCache and its env settings: $ENV{CCACHE_DIR}. Will try to use it." ) + message ( STATUS "Found CCache and its env settings: $ENV{CCACHE_DIR}. Will try to use it. Disabling precompiled headers." ) set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ccache) set_property(GLOBAL PROPERTY RULE_LAUNCH_LINK ccache) + SET ( DEFAULT_PRECOMPILED_HEADERS OFF ) else() message ( WARNING "Found CCache but env settings: CCACHE_DIR is not set. Skipping." ) endif() @@ -52,30 +75,6 @@ ELSE() SET( Qt_VERSION 5 ) ENDIF() - -# Set build variables -SET ( DO_NOT_USE_QT_VERSION_6_LIBS OFF ) -SET ( USE_PRECOMPILED_HEADERS ON ) -SET ( DEFAULT_PROTOBUF ON ) -SET ( DEFAULT_BOBLIGHT ON ) -SET ( DEFAULT_WS281XPWM OFF ) -SET ( DEFAULT_USE_SYSTEM_FLATBUFFERS_LIBS OFF ) -SET ( DEFAULT_USE_SYSTEM_MBEDTLS_LIBS OFF ) -SET ( DEFAULT_MF OFF ) -SET ( DEFAULT_DX OFF ) -SET ( DEFAULT_AVF OFF ) -SET ( DEFAULT_MAC_SYSTEM OFF ) -SET ( DEFAULT_V4L2 OFF ) -SET ( DEFAULT_X11 OFF ) -SET ( DEFAULT_PIPEWIRE OFF ) -SET ( DEFAULT_FRAMEBUFFER OFF ) -SET ( DEFAULT_SOUNDCAPWINDOWS OFF ) -SET ( DEFAULT_SOUNDCAPMACOS OFF ) -SET ( DEFAULT_CEC OFF ) -SET ( DEFAULT_BONJOUR ON ) -SET ( DEFAULT_MQTT ON ) -SET ( DEFAULT_STATIC_QT_PLUGINS OFF ) - IF ( ${CMAKE_SYSTEM} MATCHES "Linux" ) SET ( DEFAULT_SOUNDCAPLINUX ON ) SET ( DEFAULT_V4L2 ON ) @@ -150,9 +149,9 @@ if ( "${PLATFORM}" MATCHES "osx" ) list(APPEND CMAKE_PREFIX_PATH "/usr/local/opt/qt5") endif() - SET ( DEFAULT_AVF ON ) - SET ( DEFAULT_MAC_SYSTEM ON ) - SET ( USE_PRECOMPILED_HEADERS OFF ) + SET ( DEFAULT_AVF ON ) + SET ( DEFAULT_MAC_SYSTEM ON ) + SET ( DEFAULT_PRECOMPILED_HEADERS OFF ) elseif ( "${PLATFORM}" MATCHES "rpi" ) SET ( DEFAULT_WS281XPWM ON ) SET ( DEFAULT_CEC ON ) @@ -359,6 +358,9 @@ message(STATUS "ENABLE_MQTT = ${ENABLE_MQTT}") option(USE_STATIC_QT_PLUGINS "Enable static QT plugins" ${DEFAULT_STATIC_QT_PLUGINS}) message(STATUS "USE_STATIC_QT_PLUGINS = ${USE_STATIC_QT_PLUGINS}") +option(USE_PRECOMPILED_HEADERS "Enable precompiled headers (PCH)" ${DEFAULT_PRECOMPILED_HEADERS}) +message(STATUS "USE_PRECOMPILED_HEADERS = ${USE_PRECOMPILED_HEADERS}") + SET ( FLATBUFFERS_INSTALL_BIN_DIR ${CMAKE_BINARY_DIR}/flatbuf ) SET ( FLATBUFFERS_INSTALL_LIB_DIR ${CMAKE_BINARY_DIR}/flatbuf ) diff --git a/cmake/packages.cmake b/cmake/packages.cmake index c81848779..72a4e48ea 100644 --- a/cmake/packages.cmake +++ b/cmake/packages.cmake @@ -69,7 +69,7 @@ if ( ENABLE_CEC ) endif() SET ( CPACK_DEBIAN_PACKAGE_SUGGESTS "libx11-6" ) SET ( CPACK_DEBIAN_PACKAGE_SECTION "Miscellaneous" ) -SET ( CPACK_DEBIAN_COMPRESSION_TYPE "xz" ) +SET ( CPACK_DEBIAN_COMPRESSION_TYPE "gzip" ) # .rpm for rpm # https://cmake.org/cmake/help/v3.5/module/CPackRPM.html diff --git a/sources/leddevice/dev_net/LedDevicePhilipsHue.cpp b/sources/leddevice/dev_net/LedDevicePhilipsHue.cpp index 8e7239c5a..bf3584f8f 100644 --- a/sources/leddevice/dev_net/LedDevicePhilipsHue.cpp +++ b/sources/leddevice/dev_net/LedDevicePhilipsHue.cpp @@ -10,6 +10,7 @@ #include #include +#include // Constants namespace {