Commit 1b7ae532 authored by Jan Möbius's avatar Jan Möbius

Enable Python support if available

parent 83a37dff
Pipeline #8470 canceled with stages
in 1 minute and 6 seconds
# Force minimal cmake version # Force minimal cmake version
# Required 3.8 to use source_group TREE # Required 3.8 to use source_group TREE
cmake_minimum_required(VERSION 3.8.0 FATAL_ERROR) # Required 3.12 to use findPython3
cmake_minimum_required(VERSION 3.12.0 FATAL_ERROR)
file(SHA512 ${CMAKE_SOURCE_DIR}/CMakeLists.txt HASH_TOPLEVEL_CMAKEFILE) file(SHA512 ${CMAKE_SOURCE_DIR}/CMakeLists.txt HASH_TOPLEVEL_CMAKEFILE)
file(SHA512 ${CMAKE_SOURCE_DIR}/OpenFlipper/cmake/CMakeLists.txt HASH_LATEST_CMAKEFILE) file(SHA512 ${CMAKE_SOURCE_DIR}/OpenFlipper/cmake/CMakeLists.txt HASH_LATEST_CMAKEFILE)
...@@ -77,6 +78,24 @@ file ( ...@@ -77,6 +78,24 @@ file (
) )
set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${_more_macro_directories}) set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${_more_macro_directories})
# ========================================================================
# Python support
# ========================================================================
if (NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM)
set(DISABLE_OPENFLIPPER_PYTHON_SYSTEM "FALSE" CACHE BOOL "Choose if OpenFlippers integrated Python system should be build" FORCE)
endif()
if (NOT DISABLE_OPENFLIPPER_PYTHON_SYSTEM)
find_package(Python3 COMPONENTS Development)
if (NOT TARGET pybind11::module OR NOT TARGET pybind11::embed)
add_subdirectory(OpenFlipper/libs_required/pybind11)
endif()
endif()
# ======================================================================== # ========================================================================
# QT Setup # QT Setup
# ======================================================================== # ========================================================================
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment