Skip to content

Commit

Permalink
CMake: renamed PYTHON_VERSION to PYTHON_SUPPORT and GUI_VERSION
Browse files Browse the repository at this point in the history
… to `GUI_SUPPORT`.

More meaningful this way, not to mention that `PYTHON_VERSION` is used elsewhere in our CMake code!
  • Loading branch information
agarny committed Oct 15, 2019
1 parent ab8a8f8 commit 7bcaf49
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
16 changes: 8 additions & 8 deletions src/plugins/plugin.cpp
Expand Up @@ -26,21 +26,21 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
#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
Expand Down Expand Up @@ -142,25 +142,25 @@ Plugin::Plugin(const QString &pFileName, PluginInfo *pInfo,
&& (interfaceVersion(pFileName, "fileHandlingInterfaceVersion") != fileHandlingInterfaceVersion()))
|| ( (qobject_cast<FileTypeInterface *>(mInstance) != nullptr)
&& (interfaceVersion(pFileName, "fileTypeInterfaceVersion") != fileTypeInterfaceVersion()))
#ifdef GUI_VERSION
#ifdef GUI_SUPPORT
|| ( (qobject_cast<GuiInterface *>(mInstance) != nullptr)
&& (interfaceVersion(pFileName, "guiInterfaceVersion") != guiInterfaceVersion()))
|| ( (qobject_cast<I18nInterface *>(mInstance) != nullptr)
&& (interfaceVersion(pFileName, "i18nInterfaceVersion") != i18nInterfaceVersion()))
#endif
|| ( (pluginInterface != nullptr)
&& (interfaceVersion(pFileName, "pluginInterfaceVersion") != pluginInterfaceVersion()))
#ifdef GUI_VERSION
#ifdef GUI_SUPPORT
|| ( (qobject_cast<PreferencesInterface *>(mInstance) != nullptr)
&& (interfaceVersion(pFileName, "preferencesInterfaceVersion") != preferencesInterfaceVersion()))
#endif
#ifdef PYTHON_VERSION
#ifdef PYTHON_SUPPORT
|| ( (qobject_cast<PythonInterface *>(mInstance) != nullptr)
&& (interfaceVersion(pFileName, "pythonInterfaceVersion") != pythonInterfaceVersion()))
|| ( (qobject_cast<SolverInterface *>(mInstance) != nullptr)
&& (interfaceVersion(pFileName, "solverInterfaceVersion") != solverInterfaceVersion()))
#endif
#ifdef GUI_VERSION
#ifdef GUI_SUPPORT
|| ( (qobject_cast<ViewInterface *>(mInstance) != nullptr)
&& (interfaceVersion(pFileName, "viewInterfaceVersion") != viewInterfaceVersion()))
|| ( (qobject_cast<WindowInterface *>(mInstance) != nullptr)
Expand Down

0 comments on commit 7bcaf49

Please sign in to comment.