Skip to content

Commit 7b1ae1b

Browse files
committed
Compile OMEdit even if omc is configured without CORBA bindings
git-svn-id: https://openmodelica.org/svn/OpenModelica/trunk@23397 f25d12d1-65f4-0310-ae8a-bbce733d8d8e
1 parent de58286 commit 7b1ae1b

File tree

5 files changed

+21
-6
lines changed

5 files changed

+21
-6
lines changed

OMEdit/OMEditGUI/Makefile.unix.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ omc_communication.cc: $(runtimedir)/omc_communication.idl
3434
@IDLCMD@ $<
3535
omc_communication.h: omc_communication.cc
3636

37-
$(NAME): parsergen Makefile OMEdit.config omc_communication.cpp
37+
$(NAME): parsergen Makefile OMEdit.config
3838
$(MAKE) -f Makefile
3939

4040
clean:

OMEdit/OMEditGUI/OMC/OMCProxy.cpp

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,13 @@ static QVariant parseExpression(QString result)
9696
\param pMainWindow - pointer to MainWindow
9797
*/
9898
OMCProxy::OMCProxy(MainWindow *pMainWindow)
99-
: QObject(pMainWindow), mOMC(0), mHasInitialized(false), mCanUseEventLoop(true) ,mResult("")
99+
: QObject(pMainWindow),
100+
#if !USE_OMC_SHARED_OBJECT
101+
mOMC(0),
102+
#endif
103+
mHasInitialized(false),
104+
mCanUseEventLoop(true),
105+
mResult("")
100106
{
101107
mpMainWindow = pMainWindow;
102108
mCurrentCommandIndex = -1;

OMEdit/OMEditGUI/OMC/OMCProxy.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,14 @@
4040
#define OMCPROXY_H
4141

4242
#include "MainWindow.h"
43-
#include "omc_communication.h"
4443
#include "Component.h"
4544
#include "StringHandler.h"
4645
#include "Utilities.h"
4746

47+
#if !USE_OMC_SHARED_OBJECT
48+
#include "omc_communication.h"
49+
#endif
50+
4851
class MainWindow;
4952
class CustomExpressionBox;
5053
class ComponentInfo;
@@ -60,7 +63,9 @@ class OMCProxy : public QObject
6063
{
6164
Q_OBJECT
6265
private:
66+
#if !USE_OMC_SHARED_OBJECT
6367
OmcCommunication_var mOMC;
68+
#endif
6469
bool mHasInitialized;
6570
qint64 mOMCProcessId;
6671
bool mCanUseEventLoop;

OMEdit/OMEditGUI/OMEdit.config.in

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,16 @@ QMAKE_CC = @CC@
77
QMAKE_CXX = @CXX@
88
QMAKE_LINK = @CXX@
99

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

1822
QMAKE_CFLAGS = @CFLAGS@ @CPPFLAGS@

OMEdit/OMEditGUI/OMEditGUI.pro

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,6 @@ SOURCES += main.cpp \
5959
Util/backtrace.c \
6060
Util/Helper.cpp \
6161
MainWindow.cpp \
62-
omc_communication.cc \
6362
OMC/OMCProxy.cpp \
6463
Util/StringHandler.cpp \
6564
Modeling/MessagesWidget.cpp \
@@ -116,7 +115,6 @@ SOURCES += main.cpp \
116115
HEADERS += Util/backtrace.h \
117116
Util/Helper.h \
118117
MainWindow.h \
119-
omc_communication.h \
120118
OMC/OMCProxy.h \
121119
Util/StringHandler.h \
122120
Modeling/MessagesWidget.h \
@@ -200,6 +198,8 @@ win32 {
200198
../../3rdParty/qwt/build/include \
201199
../../OMPlot/OMPlotGUI \
202200
../../ ../../3rdParty/antlr/3.2/libantlr3c-3.2/ ../../3rdParty/antlr/3.2/libantlr3c-3.2/include
201+
SOURCES += omc_communication.cc
202+
HEADERS += omc_communication.h
203203
} else { # Unix libraries and includes
204204
include(OMEdit.config)
205205
# On unix we use backtrace of execinfo.h which requires -rdynamic

0 commit comments

Comments
 (0)