mirror of
https://github.com/hyperion-project/hyperion.ng.git
synced 2025-03-01 10:33:28 +00:00
Hyperion Light 2 (#1428)
* Hyperion Light - Have EffectEngine as component * Hyperion light - Build switches for LED Devices (Serial, Network) * Fix file uri generation * Fix missing guard for Windows * Fix file uri generation * Update jsonschema and checkschema * Allow to provide cmake build args to docker build
This commit is contained in:
@@ -1,15 +1,17 @@
|
||||
# Define the current source locations
|
||||
|
||||
# Include the python directory. Also include the parent (which is for example /usr/include)
|
||||
# which may be required when it is not includes by the (cross-) compiler by default.
|
||||
if (NOT CMAKE_VERSION VERSION_LESS "3.12")
|
||||
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
|
||||
include_directories(${Python3_INCLUDE_DIRS} ${Python3_INCLUDE_DIRS}/..)
|
||||
add_compile_definitions(PYTHON_VERSION_MAJOR_MINOR=${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR})
|
||||
else()
|
||||
find_package (PythonLibs ${PYTHON_VERSION_STRING} EXACT) # Maps PythonLibs to the PythonInterp version of the main cmake
|
||||
include_directories(${PYTHON_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS}/..)
|
||||
add_definitions(-DPYTHON_VERSION_MAJOR_MINOR=${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR})
|
||||
if(ENABLE_EFFECTENGINE)
|
||||
# Include the python directory. Also include the parent (which is for example /usr/include)
|
||||
# which may be required when it is not includes by the (cross-) compiler by default.
|
||||
if (NOT CMAKE_VERSION VERSION_LESS "3.12")
|
||||
find_package(Python3 COMPONENTS Interpreter Development REQUIRED)
|
||||
include_directories(${Python3_INCLUDE_DIRS} ${Python3_INCLUDE_DIRS}/..)
|
||||
add_compile_definitions(PYTHON_VERSION_MAJOR_MINOR=${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR})
|
||||
else()
|
||||
find_package (PythonLibs ${PYTHON_VERSION_STRING} EXACT) # Maps PythonLibs to the PythonInterp version of the main cmake
|
||||
include_directories(${PYTHON_INCLUDE_DIRS} ${PYTHON_INCLUDE_DIRS}/..)
|
||||
add_definitions(-DPYTHON_VERSION_MAJOR_MINOR=${PYTHON_VERSION_MAJOR}${PYTHON_VERSION_MINOR})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
SET(CURRENT_HEADER_DIR ${CMAKE_SOURCE_DIR}/include/utils)
|
||||
@@ -27,8 +29,11 @@ add_library(hyperion-utils
|
||||
|
||||
target_link_libraries(hyperion-utils
|
||||
hyperion
|
||||
python
|
||||
Qt${QT_VERSION_MAJOR}::Core
|
||||
Qt${QT_VERSION_MAJOR}::Gui
|
||||
Qt${QT_VERSION_MAJOR}::Network
|
||||
)
|
||||
|
||||
if(ENABLE_EFFECTENGINE)
|
||||
target_link_libraries(hyperion-utils python)
|
||||
endif()
|
||||
|
@@ -1,5 +1,9 @@
|
||||
#include "HyperionConfig.h"
|
||||
|
||||
#if defined(ENABLE_EFFECTENGINE)
|
||||
// Python includes
|
||||
#include <Python.h>
|
||||
#endif
|
||||
|
||||
#include "utils/SysInfo.h"
|
||||
#include "utils/FileUtils.h"
|
||||
@@ -10,6 +14,9 @@
|
||||
#include <QRegularExpressionMatch>
|
||||
|
||||
#include <iostream>
|
||||
#ifndef _WIN32
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <shlobj_core.h>
|
||||
@@ -32,7 +39,9 @@ SysInfo::SysInfo()
|
||||
_sysinfo.isUserAdmin = isUserAdmin();
|
||||
getCPUInfo();
|
||||
_sysinfo.qtVersion = QT_VERSION_STR;
|
||||
#if defined(ENABLE_EFFECTENGINE)
|
||||
_sysinfo.pyVersion = PY_VERSION;
|
||||
#endif
|
||||
}
|
||||
|
||||
SysInfo::HyperionSysInfo SysInfo::get()
|
||||
|
Reference in New Issue
Block a user