[libcalamares] repair boost / pybind split
The difference wasn't being recorded in the ABI-parts of the CalamaresConfig.h header file, and it was unclear if the two builds were "clean", e.g. no pybind11 stuff in a boost build and vice-versa. Tidy that up by writing more ABI info to the header and double-checking defines when including Python-related Calamares headers.
This commit is contained in:
parent
34888edae1
commit
be5ce2e60f
@ -94,4 +94,6 @@ include(CalamaresAddPlugin)
|
|||||||
# This list should match the one in libcalamares/CalamaresConfig.h,
|
# This list should match the one in libcalamares/CalamaresConfig.h,
|
||||||
# which is the C++-language side of the same configuration.
|
# which is the C++-language side of the same configuration.
|
||||||
set(Calamares_WITH_PYTHON @WITH_PYTHON@)
|
set(Calamares_WITH_PYTHON @WITH_PYTHON@)
|
||||||
|
set(Calamares_WITH_PYBIND11 @WITH_PYBIND11@)
|
||||||
set(Calamares_WITH_QML @WITH_QML@)
|
set(Calamares_WITH_QML @WITH_QML@)
|
||||||
|
set(Calamares_WITH_QT6 @WITH_QT6@)
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
// - Python support with older Boost implementation
|
// - Python support with older Boost implementation
|
||||||
// - QML support
|
// - QML support
|
||||||
#ifdef WITH_PYTHON
|
#ifdef WITH_PYTHON
|
||||||
#if WITH_PYBIND11
|
#ifdef WITH_PYBIND11
|
||||||
#include "python/PythonJob.h"
|
#include "python/PythonJob.h"
|
||||||
#else
|
#else
|
||||||
#include "PythonJob.h"
|
#include "PythonJob.h"
|
||||||
@ -486,7 +486,7 @@ main( int argc, char* argv[] )
|
|||||||
#ifdef WITH_PYTHON
|
#ifdef WITH_PYTHON
|
||||||
if ( module.m_pythonInjection )
|
if ( module.m_pythonInjection )
|
||||||
{
|
{
|
||||||
#if WITH_PYBIND11
|
#ifdef WITH_PYBIND11
|
||||||
Calamares::Python::Job::setInjectedPreScript( pythonPreScript );
|
Calamares::Python::Job::setInjectedPreScript( pythonPreScript );
|
||||||
#else
|
#else
|
||||||
// Old Boost approach
|
// Old Boost approach
|
||||||
|
@ -25,6 +25,8 @@
|
|||||||
* which is the CMake-time side of the same configuration.
|
* which is the CMake-time side of the same configuration.
|
||||||
*/
|
*/
|
||||||
#cmakedefine WITH_PYTHON
|
#cmakedefine WITH_PYTHON
|
||||||
|
#cmakedefine WITH_PYBIND11
|
||||||
#cmakedefine WITH_QML
|
#cmakedefine WITH_QML
|
||||||
|
#cmakedefine WITH_QT6
|
||||||
|
|
||||||
#endif // CALAMARESCONFIG_H
|
#endif // CALAMARESCONFIG_H
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
|
|
||||||
#if WITH_PYBIND11
|
#ifdef WITH_PYBIND11
|
||||||
#error Source only for Boost::Python
|
#error Source only for Boost::Python
|
||||||
#else
|
#else
|
||||||
#endif
|
#endif
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#if WITH_PYBIND11
|
#ifdef WITH_PYBIND11
|
||||||
#error Source only for Boost::Python
|
#error Source only for Boost::Python
|
||||||
#else
|
#else
|
||||||
#endif
|
#endif
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
#include <QFileInfo>
|
#include <QFileInfo>
|
||||||
#include <QString>
|
#include <QString>
|
||||||
|
|
||||||
#if WITH_PYBIND11
|
#ifdef WITH_PYBIND11
|
||||||
#else
|
#else
|
||||||
#error Source only for pybind11
|
#error Source only for pybind11
|
||||||
#endif
|
#endif
|
||||||
|
@ -12,6 +12,8 @@
|
|||||||
|
|
||||||
// This file is called PythonJob.h because it would otherwise
|
// This file is called PythonJob.h because it would otherwise
|
||||||
// clash with the Job.h in libcalamares proper.
|
// clash with the Job.h in libcalamares proper.
|
||||||
|
|
||||||
|
#include "CalamaresConfig.h"
|
||||||
#include "DllMacro.h"
|
#include "DllMacro.h"
|
||||||
#include "Job.h"
|
#include "Job.h"
|
||||||
|
|
||||||
@ -19,7 +21,7 @@
|
|||||||
|
|
||||||
#include <memory>
|
#include <memory>
|
||||||
|
|
||||||
#if WITH_PYBIND11
|
#ifdef WITH_PYBIND11
|
||||||
#else
|
#else
|
||||||
#error Source only for pybind11
|
#error Source only for pybind11
|
||||||
#endif
|
#endif
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
#include "PythonJobModule.h"
|
#include "PythonJobModule.h"
|
||||||
|
|
||||||
#if WITH_PYBIND11
|
#ifdef WITH_PYBIND11
|
||||||
#include "python/PythonJob.h"
|
#include "python/PythonJob.h"
|
||||||
using JobType = Calamares::Python::Job;
|
using JobType = Calamares::Python::Job;
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user