diff --git a/CalamaresConfig.cmake.in b/CalamaresConfig.cmake.in index eabf54554..3d23bc4cf 100644 --- a/CalamaresConfig.cmake.in +++ b/CalamaresConfig.cmake.in @@ -94,4 +94,6 @@ include(CalamaresAddPlugin) # This list should match the one in libcalamares/CalamaresConfig.h, # which is the C++-language side of the same configuration. set(Calamares_WITH_PYTHON @WITH_PYTHON@) +set(Calamares_WITH_PYBIND11 @WITH_PYBIND11@) set(Calamares_WITH_QML @WITH_QML@) +set(Calamares_WITH_QT6 @WITH_QT6@) diff --git a/src/calamares/testmain.cpp b/src/calamares/testmain.cpp index 4f8ae6452..203c97936 100644 --- a/src/calamares/testmain.cpp +++ b/src/calamares/testmain.cpp @@ -34,7 +34,7 @@ // - Python support with older Boost implementation // - QML support #ifdef WITH_PYTHON -#if WITH_PYBIND11 +#ifdef WITH_PYBIND11 #include "python/PythonJob.h" #else #include "PythonJob.h" @@ -486,7 +486,7 @@ main( int argc, char* argv[] ) #ifdef WITH_PYTHON if ( module.m_pythonInjection ) { -#if WITH_PYBIND11 +#ifdef WITH_PYBIND11 Calamares::Python::Job::setInjectedPreScript( pythonPreScript ); #else // Old Boost approach diff --git a/src/libcalamares/CalamaresConfig.h.in b/src/libcalamares/CalamaresConfig.h.in index 23d4ebfd0..365fd6608 100644 --- a/src/libcalamares/CalamaresConfig.h.in +++ b/src/libcalamares/CalamaresConfig.h.in @@ -25,6 +25,8 @@ * which is the CMake-time side of the same configuration. */ #cmakedefine WITH_PYTHON +#cmakedefine WITH_PYBIND11 #cmakedefine WITH_QML +#cmakedefine WITH_QT6 #endif // CALAMARESCONFIG_H diff --git a/src/libcalamares/PythonJob.cpp b/src/libcalamares/PythonJob.cpp index 2496a2c25..6a92d8dde 100644 --- a/src/libcalamares/PythonJob.cpp +++ b/src/libcalamares/PythonJob.cpp @@ -19,7 +19,7 @@ #include -#if WITH_PYBIND11 +#ifdef WITH_PYBIND11 #error Source only for Boost::Python #else #endif diff --git a/src/libcalamares/PythonJob.h b/src/libcalamares/PythonJob.h index 7a130b7bc..7a86b8a35 100644 --- a/src/libcalamares/PythonJob.h +++ b/src/libcalamares/PythonJob.h @@ -19,7 +19,7 @@ #include -#if WITH_PYBIND11 +#ifdef WITH_PYBIND11 #error Source only for Boost::Python #else #endif diff --git a/src/libcalamares/python/PythonJob.cpp b/src/libcalamares/python/PythonJob.cpp index 504699bb8..cc285d906 100644 --- a/src/libcalamares/python/PythonJob.cpp +++ b/src/libcalamares/python/PythonJob.cpp @@ -20,7 +20,7 @@ #include #include -#if WITH_PYBIND11 +#ifdef WITH_PYBIND11 #else #error Source only for pybind11 #endif diff --git a/src/libcalamares/python/PythonJob.h b/src/libcalamares/python/PythonJob.h index d1cb572ec..abdec676d 100644 --- a/src/libcalamares/python/PythonJob.h +++ b/src/libcalamares/python/PythonJob.h @@ -11,7 +11,9 @@ #define CALAMARES_PYTHON_PYTHONJOB_H // This file is called PythonJob.h because it would otherwise -// clashwith the Job.h in libcalamares proper. +// clash with the Job.h in libcalamares proper. + +#include "CalamaresConfig.h" #include "DllMacro.h" #include "Job.h" @@ -19,7 +21,7 @@ #include -#if WITH_PYBIND11 +#ifdef WITH_PYBIND11 #else #error Source only for pybind11 #endif diff --git a/src/libcalamaresui/modulesystem/PythonJobModule.cpp b/src/libcalamaresui/modulesystem/PythonJobModule.cpp index 1936f41e7..73c115407 100644 --- a/src/libcalamaresui/modulesystem/PythonJobModule.cpp +++ b/src/libcalamaresui/modulesystem/PythonJobModule.cpp @@ -10,7 +10,7 @@ #include "PythonJobModule.h" -#if WITH_PYBIND11 +#ifdef WITH_PYBIND11 #include "python/PythonJob.h" using JobType = Calamares::Python::Job; #else