From 7bcaf499788eaa222aa3fd01907f9fd3ced564bf Mon Sep 17 00:00:00 2001 From: Alan Garny Date: Tue, 15 Oct 2019 14:16:19 +1300 Subject: [PATCH] CMake: renamed `PYTHON_VERSION` to `PYTHON_SUPPORT` and `GUI_VERSION` to `GUI_SUPPORT`. More meaningful this way, not to mention that `PYTHON_VERSION` is used elsewhere in our CMake code! --- CMakeLists.txt | 4 ++-- src/plugins/plugin.cpp | 16 ++++++++-------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7da0fb07cb..d14355ed81 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -976,7 +976,7 @@ if(USE_PREBUILT_QTWEBKIT_PACKAGE) # Let OpenCOR know that we want Python support - add_definitions(-DPYTHON_VERSION) + add_definitions(-DPYTHON_SUPPORT) # Let OpenCOR know about the prebuilt version of our QtWebKit package # being used @@ -1031,7 +1031,7 @@ add_executable(${CMAKE_PROJECT_NAME} WIN32 MACOSX_BUNDLE add_definitions(-D${CMAKE_PROJECT_NAME}_MAIN) -target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE GUI_VERSION) +target_compile_definitions(${CMAKE_PROJECT_NAME} PRIVATE GUI_SUPPORT) # We can't compile Python interface code until after the Python headers are in # place diff --git a/src/plugins/plugin.cpp b/src/plugins/plugin.cpp index e102e10a4e..f308e6d1e8 100644 --- a/src/plugins/plugin.cpp +++ b/src/plugins/plugin.cpp @@ -26,21 +26,21 @@ along with this program. If not, see . #include "datastoreinterface.h" #include "filehandlinginterface.h" #include "filetypeinterface.h" -#ifdef GUI_VERSION +#ifdef GUI_SUPPORT #include "guiinterface.h" #include "i18ninterface.h" #endif #include "plugin.h" #include "plugininterface.h" #include "pluginmanager.h" -#ifdef GUI_VERSION +#ifdef GUI_SUPPORT #include "preferencesinterface.h" #endif -#ifdef PYTHON_VERSION +#ifdef PYTHON_SUPPORT #include "pythoninterface.h" #endif #include "solverinterface.h" -#ifdef GUI_VERSION +#ifdef GUI_SUPPORT #include "viewinterface.h" #include "windowinterface.h" #endif @@ -142,7 +142,7 @@ Plugin::Plugin(const QString &pFileName, PluginInfo *pInfo, && (interfaceVersion(pFileName, "fileHandlingInterfaceVersion") != fileHandlingInterfaceVersion())) || ( (qobject_cast(mInstance) != nullptr) && (interfaceVersion(pFileName, "fileTypeInterfaceVersion") != fileTypeInterfaceVersion())) -#ifdef GUI_VERSION +#ifdef GUI_SUPPORT || ( (qobject_cast(mInstance) != nullptr) && (interfaceVersion(pFileName, "guiInterfaceVersion") != guiInterfaceVersion())) || ( (qobject_cast(mInstance) != nullptr) @@ -150,17 +150,17 @@ Plugin::Plugin(const QString &pFileName, PluginInfo *pInfo, #endif || ( (pluginInterface != nullptr) && (interfaceVersion(pFileName, "pluginInterfaceVersion") != pluginInterfaceVersion())) -#ifdef GUI_VERSION +#ifdef GUI_SUPPORT || ( (qobject_cast(mInstance) != nullptr) && (interfaceVersion(pFileName, "preferencesInterfaceVersion") != preferencesInterfaceVersion())) #endif -#ifdef PYTHON_VERSION +#ifdef PYTHON_SUPPORT || ( (qobject_cast(mInstance) != nullptr) && (interfaceVersion(pFileName, "pythonInterfaceVersion") != pythonInterfaceVersion())) || ( (qobject_cast(mInstance) != nullptr) && (interfaceVersion(pFileName, "solverInterfaceVersion") != solverInterfaceVersion())) #endif -#ifdef GUI_VERSION +#ifdef GUI_SUPPORT || ( (qobject_cast(mInstance) != nullptr) && (interfaceVersion(pFileName, "viewInterfaceVersion") != viewInterfaceVersion())) || ( (qobject_cast(mInstance) != nullptr)