0032315: Configuration, CMake - fix building Draw Harness plugins as static libraries
[occt.git] / src / DRAWEXE / DRAWEXE.cxx
1 // Created on: 2003-08-11
2 // Created by: Sergey ZARITCHNY
3 // Copyright (c) 2003-2014 OPEN CASCADE SAS
4 //
5 // This file is part of Open CASCADE Technology software library.
6 //
7 // This library is free software; you can redistribute it and/or modify it under
8 // the terms of the GNU Lesser General Public License version 2.1 as published
9 // by the Free Software Foundation, with special exception defined in the file
10 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
11 // distribution for complete text of the license and disclaimer of any warranty.
12 //
13 // Alternatively, this file may be used under the terms of Open CASCADE
14 // commercial license or contractual agreement.
15
16 #include <Draw.hxx>
17 #include <DBRep.hxx>
18 #include <DrawTrSurf.hxx>
19 #include <Message.hxx>
20 #include <Message_PrinterSystemLog.hxx>
21
22 #ifdef OCCT_NO_PLUGINS
23   #include <BOPTest.hxx>
24   #include <DPrsStd.hxx>
25   #if defined(HAVE_OPENGL) || defined(HAVE_GLES2)
26   #include <OpenGlTest.hxx>
27   #endif
28   #include <TObjDRAW.hxx>
29   #include <ViewerTest.hxx>
30   #include <XSDRAWSTLVRML.hxx>
31   #include <XDEDRAW.hxx>
32 #endif
33
34 //=======================================================================
35 //function : Draw_InitAppli
36 //purpose  : 
37 //=======================================================================
38
39 void Draw_InitAppli (Draw_Interpretor& di)
40 {
41 #if defined(__EMSCRIPTEN__)
42   // open JavaScript console within the Browser to see this output
43   Handle(Message_PrinterSystemLog) aJSConsolePrinter = new Message_PrinterSystemLog ("DRAWEXE");
44   Message::DefaultMessenger()->AddPrinter (aJSConsolePrinter);
45 #endif
46
47   Draw::Commands (di);
48   DBRep::BasicCommands (di);
49   DrawTrSurf::BasicCommands (di);
50
51 #ifdef OCCT_NO_PLUGINS
52   // load a couple of plugins
53   BOPTest::Factory (di);
54   DPrsStd::Factory (di);
55   XSDRAWSTLVRML::Factory (di);
56   XDEDRAW::Factory (di);
57   #if defined(HAVE_OPENGL) || defined(HAVE_GLES2)
58   ViewerTest::Factory (di);
59   OpenGlTest::Factory (di);
60   #endif
61   //TObjDRAW::Factory (di);
62   //QADraw::Factory (di);
63 #endif
64 }
65
66 #include <Draw_Main.hxx>
67 DRAW_MAIN