Skip to content

Commit

Permalink
Compile OMEdit even if omc is configured without CORBA bindings
Browse files Browse the repository at this point in the history
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@23397 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
  • Loading branch information
sjoelund committed Nov 17, 2014
1 parent de58286 commit 7b1ae1b
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 6 deletions.
2 changes: 1 addition & 1 deletion OMEdit/OMEditGUI/Makefile.unix.in
Expand Up @@ -34,7 +34,7 @@ omc_communication.cc: $(runtimedir)/omc_communication.idl
@IDLCMD@ $<
omc_communication.h: omc_communication.cc

$(NAME): parsergen Makefile OMEdit.config omc_communication.cpp
$(NAME): parsergen Makefile OMEdit.config
$(MAKE) -f Makefile

clean:
Expand Down
8 changes: 7 additions & 1 deletion OMEdit/OMEditGUI/OMC/OMCProxy.cpp
Expand Up @@ -96,7 +96,13 @@ static QVariant parseExpression(QString result)
\param pMainWindow - pointer to MainWindow
*/
OMCProxy::OMCProxy(MainWindow *pMainWindow)
: QObject(pMainWindow), mOMC(0), mHasInitialized(false), mCanUseEventLoop(true) ,mResult("")
: QObject(pMainWindow),
#if !USE_OMC_SHARED_OBJECT
mOMC(0),
#endif
mHasInitialized(false),
mCanUseEventLoop(true),
mResult("")
{
mpMainWindow = pMainWindow;
mCurrentCommandIndex = -1;
Expand Down
7 changes: 6 additions & 1 deletion OMEdit/OMEditGUI/OMC/OMCProxy.h
Expand Up @@ -40,11 +40,14 @@
#define OMCPROXY_H

#include "MainWindow.h"
#include "omc_communication.h"
#include "Component.h"
#include "StringHandler.h"
#include "Utilities.h"

#if !USE_OMC_SHARED_OBJECT
#include "omc_communication.h"
#endif

class MainWindow;
class CustomExpressionBox;
class ComponentInfo;
Expand All @@ -60,7 +63,9 @@ class OMCProxy : public QObject
{
Q_OBJECT
private:
#if !USE_OMC_SHARED_OBJECT
OmcCommunication_var mOMC;
#endif
bool mHasInitialized;
qint64 mOMCProcessId;
bool mCanUseEventLoop;
Expand Down
6 changes: 5 additions & 1 deletion OMEdit/OMEditGUI/OMEdit.config.in
Expand Up @@ -7,12 +7,16 @@ QMAKE_CC = @CC@
QMAKE_CXX = @CXX@
QMAKE_LINK = @CXX@

LIBS += -L ../../build/lib/omc -lOMPlot -lomqwt @CORBALIBS@ -L../OMEditGUI/Debugger/Parser -lGDBMIParser -L../../Parser -lantlr3 @RPATH_QMAKE@
LIBS += -L ../../build/lib/omc -lOMPlot -lomqwt -L../OMEditGUI/Debugger/Parser -lGDBMIParser -L../../Parser -lantlr3 @RPATH_QMAKE@
INCLUDEPATH += ../../3rdParty/qwt/src @CORBA_QMAKE_INCLUDES@ ../../OMPlot/OMPlotGUI ../../3rdParty/antlr/3.2/libantlr3c-3.2/ ../../3rdParty/antlr/3.2/libantlr3c-3.2/include
true {
INCLUDEPATH += ../../build/include/omc/c
LIBS += -lOpenModelicaCompiler -lOpenModelicaRuntimeC -lfmilib_shared -lModelicaExternalC -lgc
DEFINES += "USE_OMC_SHARED_OBJECT=1"
} else {
SOURCES += omc_communication.cc
HEADERS += omc_communication.h
LIBS += @CORBALIBS@
}

QMAKE_CFLAGS = @CFLAGS@ @CPPFLAGS@
Expand Down
4 changes: 2 additions & 2 deletions OMEdit/OMEditGUI/OMEditGUI.pro
Expand Up @@ -59,7 +59,6 @@ SOURCES += main.cpp \
Util/backtrace.c \
Util/Helper.cpp \
MainWindow.cpp \
omc_communication.cc \
OMC/OMCProxy.cpp \
Util/StringHandler.cpp \
Modeling/MessagesWidget.cpp \
Expand Down Expand Up @@ -116,7 +115,6 @@ SOURCES += main.cpp \
HEADERS += Util/backtrace.h \
Util/Helper.h \
MainWindow.h \
omc_communication.h \
OMC/OMCProxy.h \
Util/StringHandler.h \
Modeling/MessagesWidget.h \
Expand Down Expand Up @@ -200,6 +198,8 @@ win32 {
../../3rdParty/qwt/build/include \
../../OMPlot/OMPlotGUI \
../../ ../../3rdParty/antlr/3.2/libantlr3c-3.2/ ../../3rdParty/antlr/3.2/libantlr3c-3.2/include
SOURCES += omc_communication.cc
HEADERS += omc_communication.h
} else { # Unix libraries and includes
include(OMEdit.config)
# On unix we use backtrace of execinfo.h which requires -rdynamic
Expand Down

0 comments on commit 7b1ae1b

Please sign in to comment.